> ## 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

सार्वभौमिक HTTP क्लाइंट, जो Node.js और ब्राउज़र दोनों वातावरणों में काम करता है

<div id="constructors">
  ## कन्स्ट्रक्टर्स
</div>

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

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

<div id="returns">
  #### रिटर्न
</div>

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

#### यहाँ परिभाषित

[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`](/hi/xdks/typescript/reference/interfaces/HttpResponse)>

एक HTTP रिक्वेस्ट भेजें

<div id="parameters">
  #### पैरामीटर
</div>

| नाम       | type                                                                                            |
| :-------- | :---------------------------------------------------------------------------------------------- |
| `url`     | `string`                                                                                        |
| `options` | [`HttpClientRequestOptions`](/hi/xdks/typescript/reference/interfaces/HttpClientRequestOptions) |

<div id="returns">
  #### रिटर्न
</div>

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

#### यहाँ परिभाषित

[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`](/hi/xdks/typescript/reference/interfaces/HttpResponse)>

GET अनुरोध करें

<div id="parameters">
  #### पैरामीटर
</div>

| नाम        | Type                          |
| :--------- | :---------------------------- |
| `url`      | `string`                      |
| `headers?` | `Record`\<`string`, `string`> |

<div id="returns">
  #### रिटर्न
</div>

`Promise`\<[`HttpResponse`](/hi/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`](/hi/xdks/typescript/reference/interfaces/HttpResponse)>

POST अनुरोध करें

<div id="parameters">
  #### पैरामीटर
</div>

| नाम        | type                          |
| :--------- | :---------------------------- |
| `url`      | `string`                      |
| `body?`    | `string`                      |
| `headers?` | `Record`\<`string`, `string`> |

<div id="returns">
  #### रिटर्न
</div>

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

<div id="defined-in">
  #### यहाँ परिभाषित है
</div>

[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`](/hi/xdks/typescript/reference/interfaces/HttpResponse)>

PUT अनुरोध करें

<div id="parameters">
  #### पैरामीटर
</div>

| नाम        | type                          |
| :--------- | :---------------------------- |
| `url`      | `string`                      |
| `body?`    | `string`                      |
| `headers?` | `Record`\<`string`, `string`> |

<div id="returns">
  #### रिटर्न
</div>

`Promise`\<[`HttpResponse`](/hi/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`](/hi/xdks/typescript/reference/interfaces/HttpResponse)>

DELETE अनुरोध भेजें

<div id="parameters">
  #### पैरामीटर
</div>

| नाम        | type                          |
| :--------- | :---------------------------- |
| `url`      | `string`                      |
| `headers?` | `Record`\<`string`, `string`> |

<div id="returns">
  #### रिटर्न
</div>

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

#### यहाँ परिभाषित

[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`](/hi/xdks/typescript/reference/interfaces/HttpResponse)>

PATCH अनुरोध करें

<div id="parameters">
  #### पैरामीटर
</div>

| नाम        | type                          |
| :--------- | :---------------------------- |
| `url`      | `string`                      |
| `body?`    | `string`                      |
| `headers?` | `Record`\<`string`, `string`> |

<div id="returns">
  #### रिटर्न
</div>

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

<div id="defined-in">
  #### यहाँ परिभाषित है
</div>

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