Skip to content

Commit c8ff8d6

Browse files
committed
chore: remove redirect
1 parent a2f90fb commit c8ff8d6

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

templates/web/src/client.ts.twig

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -657,21 +657,6 @@ class Client {
657657
return response;
658658
}
659659

660-
async redirect(method: string, url: URL, headers: Headers = {}, params: Payload = {}): Promise<string> {
661-
const { uri, options } = this.prepareRequest(method, url, headers, params);
662-
663-
const response = await fetch(uri, {
664-
...options,
665-
redirect: 'manual'
666-
});
667-
668-
if (response.status !== 301 && response.status !== 302) {
669-
throw new {{spec.title | caseUcfirst}}Exception('Invalid redirect', response.status);
670-
}
671-
672-
return response.headers.get('location') || '';
673-
}
674-
675660
async ping(): Promise<string> {
676661
return this.call('GET', new URL(this.config.endpoint + '/ping'));
677662
}

0 commit comments

Comments
 (0)