Skip to content

Commit

Permalink
chore: remove redirect
Browse files Browse the repository at this point in the history
  • Loading branch information
loks0n committed Dec 13, 2024
1 parent a2f90fb commit c8ff8d6
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions templates/web/src/client.ts.twig
Original file line number Diff line number Diff line change
Expand Up @@ -657,21 +657,6 @@ class Client {
return response;
}

async redirect(method: string, url: URL, headers: Headers = {}, params: Payload = {}): Promise<string> {
const { uri, options } = this.prepareRequest(method, url, headers, params);

const response = await fetch(uri, {
...options,
redirect: 'manual'
});

if (response.status !== 301 && response.status !== 302) {
throw new {{spec.title | caseUcfirst}}Exception('Invalid redirect', response.status);
}

return response.headers.get('location') || '';
}

async ping(): Promise<string> {
return this.call('GET', new URL(this.config.endpoint + '/ping'));
}
Expand Down

0 comments on commit c8ff8d6

Please sign in to comment.