メインコンテンツへスキップ
Node.js とブラウザーの両方の環境で動作する汎用的な HTTP クライアント

コンストラクター

コンストラクター

new HttpClient(): HttpClient

戻り値

HttpClient

定義場所

http-client.ts:43

メソッド

createHeaders

createHeaders(init?): Headers 新しい Headers インスタンスを作成します

パラメーター

名前type
init?Record<string, string>Headers

戻り値

Headers

定義元

http-client.ts:99

request

request(url, options?): Promise<HttpResponse> HTTP リクエストを実行します

パラメーター

名前
urlstring
optionsHttpClientRequestOptions

戻り値

Promise<HttpResponse>

定義場所

http-client.ts:106

get

get(url, headers?): Promise<HttpResponse> GET リクエストを実行します

パラメーター

名前Type
urlstring
headers?Record<string, string>

戻り値

Promise<HttpResponse>

定義元

http-client.ts:141

post

post(url, body?, headers?): Promise<HttpResponse> POST リクエストを実行します

パラメータ

Nametype
urlstring
body?string
headers?Record<string, string>

戻り値

Promise<HttpResponse>

定義元

http-client.ts:151

put

put(url, body?, headers?): Promise<HttpResponse> PUT リクエストを実行します

パラメータ

名前type
urlstring
body?string
headers?Record<string, string>

戻り値

Promise<HttpResponse>

定義元

http-client.ts:162

delete

delete(url, headers?): Promise<HttpResponse> DELETE リクエストを実行します

パラメーター

パラメーター名type
urlstring
headers?Record<string, string>

戻り値

Promise<HttpResponse>

定義場所

http-client.ts:173

patch

patch(url, body?, headers?): Promise<HttpResponse> PATCH リクエストを実行します

パラメーター

名前
urlstring
body?string
headers?Record<string, string>

戻り値

Promise<HttpResponse>

定義元

http-client.ts:183