@myria/api-request
Version:
Myria's Typescript api-request
15 lines (12 loc) • 430 B
text/typescript
import { ConfigOptions } from "../type";
import { BaseApiService } from "./base-api.service";
export class ResourceApiService extends BaseApiService {
constructor(configOptions: ConfigOptions) {
super("", configOptions);
}
public setUrl(url: string): void {
const detectUrl = new URL(url);
const basUrl = detectUrl.protocol + "//" + detectUrl.hostname;
this.baseURL = basUrl;
}
}