Remove extra slash in web requests
This commit is contained in:
parent
a90299fae7
commit
3588b5f93c
@ -30,9 +30,7 @@ export class WebRequest {
|
|||||||
*/
|
*/
|
||||||
execute = <T>(): Promise<T> =>
|
execute = <T>(): Promise<T> =>
|
||||||
new Promise(async (resolve, reject) => {
|
new Promise(async (resolve, reject) => {
|
||||||
const response: Response = await fetch(
|
const response: Response = await fetch(`${API_ENDPOINT}${this.endpoint}`); // Send the request
|
||||||
`${API_ENDPOINT}/${this.endpoint}`
|
|
||||||
); // Send the request
|
|
||||||
const contentType: string | null = response.headers.get("Content-Type"); // Get the response content type
|
const contentType: string | null = response.headers.get("Content-Type"); // Get the response content type
|
||||||
|
|
||||||
// Parse as Json
|
// Parse as Json
|
||||||
|
Loading…
Reference in New Issue
Block a user