-export default class UrlBuilder {
- private url: string = "";
- private query: string = "";
+export class UrlBuilder {
+ private readonly url: string = "";
+ private query: string = "";
- public addParam(param: string, value: string) {
- if (this.query.length === 0) {
- this.query += "?";
- } else {
- this.query += "&";
- }
- this.query += `${param}=${value}`;
- return this;
- }
+ public addParam(param: string, value: string) {
+ if (this.query.length === 0) {
+ this.query += "?";
+ } else {
+ this.query += "&";
+ }
+ this.query += `${param}=${value}`;
+ return this;
+ }