> ## Documentation Index
> Fetch the complete documentation index at: https://generaltranslation.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# HttpClient

Node.js とブラウザーの両方の環境で動作する汎用的な HTTP クライアント

<div id="constructors">
  ## コンストラクター
</div>

<div id="constructor">
  ### コンストラクター
</div>

• **new HttpClient**(): [`HttpClient`](/ja/xdks/typescript/reference/classes/HttpClient)

<div id="returns">
  #### 戻り値
</div>

[`HttpClient`](/ja/xdks/typescript/reference/classes/HttpClient)

<div id="defined-in">
  #### 定義場所
</div>

[http-client.ts:43](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/http-client.ts#L43)

<div id="methods">
  ## メソッド
</div>

<div id="createheaders">
  ### createHeaders
</div>

▸ **createHeaders**(`init?`): `Headers`

新しい Headers インスタンスを作成します

<div id="parameters">
  #### パラメーター
</div>

| 名前      | type                          |           |
| :------ | :---------------------------- | --------- |
| `init?` | `Record`\<`string`, `string`> | `Headers` |

<div id="returns">
  #### 戻り値
</div>

`Headers`

#### 定義元

[http-client.ts:99](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/http-client.ts#L99)

***

<div id="request">
  ### request
</div>

▸ **request**(`url`, `options?`): `Promise`\<[`HttpResponse`](/ja/xdks/typescript/reference/interfaces/HttpResponse)>

HTTP リクエストを実行します

<div id="parameters">
  #### パラメーター
</div>

| 名前        | 型                                                                                               |
| :-------- | :---------------------------------------------------------------------------------------------- |
| `url`     | `string`                                                                                        |
| `options` | [`HttpClientRequestOptions`](/ja/xdks/typescript/reference/interfaces/HttpClientRequestOptions) |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`HttpResponse`](/ja/xdks/typescript/reference/interfaces/HttpResponse)>

<div id="defined-in">
  #### 定義場所
</div>

[http-client.ts:106](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/http-client.ts#L106)

***

<div id="get">
  ### get
</div>

▸ **get**(`url`, `headers?`): `Promise`\<[`HttpResponse`](/ja/xdks/typescript/reference/interfaces/HttpResponse)>

GET リクエストを実行します

<div id="parameters">
  #### パラメーター
</div>

| 名前         | Type                          |
| :--------- | :---------------------------- |
| `url`      | `string`                      |
| `headers?` | `Record`\<`string`, `string`> |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`HttpResponse`](/ja/xdks/typescript/reference/interfaces/HttpResponse)>

#### 定義元

[http-client.ts:141](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/http-client.ts#L141)

***

<div id="post">
  ### post
</div>

▸ **post**(`url`, `body?`, `headers?`): `Promise`\<[`HttpResponse`](/ja/xdks/typescript/reference/interfaces/HttpResponse)>

POST リクエストを実行します

#### パラメータ

| Name       | type                          |
| :--------- | :---------------------------- |
| `url`      | `string`                      |
| `body?`    | `string`                      |
| `headers?` | `Record`\<`string`, `string`> |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`HttpResponse`](/ja/xdks/typescript/reference/interfaces/HttpResponse)>

#### 定義元

[http-client.ts:151](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/http-client.ts#L151)

***

<div id="put">
  ### put
</div>

▸ **put**(`url`, `body?`, `headers?`): `Promise`\<[`HttpResponse`](/ja/xdks/typescript/reference/interfaces/HttpResponse)>

PUT リクエストを実行します

#### パラメータ

| 名前         | type                          |
| :--------- | :---------------------------- |
| `url`      | `string`                      |
| `body?`    | `string`                      |
| `headers?` | `Record`\<`string`, `string`> |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`HttpResponse`](/ja/xdks/typescript/reference/interfaces/HttpResponse)>

#### 定義元

[http-client.ts:162](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/http-client.ts#L162)

***

<div id="delete">
  ### delete
</div>

▸ **delete**(`url`, `headers?`): `Promise`\<[`HttpResponse`](/ja/xdks/typescript/reference/interfaces/HttpResponse)>

DELETE リクエストを実行します

<div id="parameters">
  #### パラメーター
</div>

| パラメーター名    | type                          |
| :--------- | :---------------------------- |
| `url`      | `string`                      |
| `headers?` | `Record`\<`string`, `string`> |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`HttpResponse`](/ja/xdks/typescript/reference/interfaces/HttpResponse)>

<div id="defined-in">
  #### 定義場所
</div>

[http-client.ts:173](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/http-client.ts#L173)

***

<div id="patch">
  ### patch
</div>

▸ **patch**(`url`, `body?`, `headers?`): `Promise`\<[`HttpResponse`](/ja/xdks/typescript/reference/interfaces/HttpResponse)>

PATCH リクエストを実行します

<div id="parameters">
  #### パラメーター
</div>

| 名前         | 型                             |
| :--------- | :---------------------------- |
| `url`      | `string`                      |
| `body?`    | `string`                      |
| `headers?` | `Record`\<`string`, `string`> |

<div id="returns">
  #### 戻り値
</div>

`Promise`\<[`HttpResponse`](/ja/xdks/typescript/reference/interfaces/HttpResponse)>

#### 定義元

[http-client.ts:183](https://github.com/xdevplatform/xdk-typescript/blob/81aacb165e0802e188f608bdf462b60fc4e713a2/src/http-client.ts#L183)
