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

コンストラクタ

コンストラクタ

new HttpClient(): HttpClient

戻り値

HttpClient

定義箇所

http-client.ts:41

メソッド

createHeaders

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

パラメータ

名前
init?Record<string, string>Headers

戻り値

Headers

定義先

http-client.ts:91

request

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

パラメータ

名前
urlstring
optionsHttpClientRequestOptions

返り値

Promise<HttpResponse>

定義箇所

http-client.ts:98

get

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

パラメータ

名前
urlstring
headers?Record<string, string>

返却値

Promise<HttpResponse>

定義元

http-client.ts:135

post

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

パラメータ

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

戻り値

Promise<HttpResponse>

定義元

http-client.ts:148

put

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

パラメータ

項目名
urlstring
body?string
headers?Record<string, string>

戻り値

Promise<HttpResponse>

定義箇所

http-client.ts:163

delete

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

パラメーター

NameType
urlstring
headers?Record<string, string>

戻り値

Promise<HttpResponse>

定義箇所

http-client.ts:178

patch

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

パラメータ

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

戻り値

Promise<HttpResponse>

定義元

http-client.ts:191