メインコンテンツへスキップNode.js とブラウザの両環境で動作する汎用 HTTP クライアント
• new HttpClient(): HttpClient
HttpClient
http-client.ts:41
▸ createHeaders(init?): Headers
新しい Headers インスタンスを生成します
パラメータ
| 名前 | 型 | |
|---|
init? | Record<string, string> | Headers |
Headers
定義先
http-client.ts:91
▸ request(url, options?): Promise<HttpResponse>
HTTP リクエストを送信します
パラメータ
返り値
Promise<HttpResponse>
http-client.ts:98
▸ get(url, headers?): Promise<HttpResponse>
GET リクエストを送信します
パラメータ
| 名前 | 型 |
|---|
url | string |
headers? | Record<string, string> |
返却値
Promise<HttpResponse>
定義元
http-client.ts:135
▸ post(url, body?, headers?): Promise<HttpResponse>
POST リクエストを行います
パラメータ
| 名称 | 型 |
|---|
url | string |
body? | string |
headers? | Record<string, string> |
Promise<HttpResponse>
定義元
http-client.ts:148
▸ put(url, body?, headers?): Promise<HttpResponse>
PUT リクエストを行います
パラメータ
| 項目名 | 型 |
|---|
url | string |
body? | string |
headers? | Record<string, string> |
Promise<HttpResponse>
http-client.ts:163
▸ delete(url, headers?): Promise<HttpResponse>
DELETE リクエストを実行します
| Name | Type |
|---|
url | string |
headers? | Record<string, string> |
Promise<HttpResponse>
http-client.ts:178
▸ patch(url, body?, headers?): Promise<HttpResponse>
PATCH リクエストを実行します
パラメータ
| 名前 | 型 |
|---|
url | string |
body? | string |
headers? | Record<string, string> |
Promise<HttpResponse>
定義元
http-client.ts:191