fix(server): node-fetchおよびgotを使う以前の実装に戻す

see #9710
This commit is contained in:
syuilo
2023-01-25 12:00:04 +09:00
parent 2a2e8d0cf6
commit d4fb201d05
13 changed files with 203 additions and 427 deletions

View File

@@ -21,18 +21,13 @@ export class CaptchaService {
response,
});
const res = await this.httpRequestService.fetch(
url,
{
method: 'POST',
body: params,
const res = await this.httpRequestService.send(url, {
method: 'POST',
body: JSON.stringify(params),
headers: {
'Content-Type': 'application/json',
},
{
noOkError: true,
}
).catch(err => {
throw `${err.message ?? err}`;
});
}, { throwErrorWhenResponseNotOk: false });
if (!res.ok) {
throw `${res.status}`;