Skip to content

Commit

Permalink
#296: fixed forwarding redirect response
Browse files Browse the repository at this point in the history
  • Loading branch information
petermasking committed Sep 24, 2024
1 parent 8669415 commit 8131e3a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/http/src/HttpRemote.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,14 @@ export default class HttpRemote implements Remote
const options =
{
method: 'POST',
redirect: 'manual',
headers: headersObject,
body: body
};

const response = await this.#callRemote(remoteUrl, options, false);
const status = response.status;

const result = await this.#getResponseResult(response);
const headers = this.#createResponseHeaders(response);

Expand All @@ -116,7 +118,7 @@ export default class HttpRemote implements Remote

#isErrorResponse(response: Response): boolean
{
return response.status < 200 || response.status > 299;
return response.status < 200 || response.status > 399;
}

async #createRequestBody(body: unknown): Promise<string>
Expand Down

0 comments on commit 8131e3a

Please sign in to comment.