# HTTP Request Block

<figure><img src="https://742850480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmtnl2J19CnNVA5fLFAPs%2Fuploads%2Fgit-blob-c8084b16a23f5c54096aa6d27059624b84773b41%2Fimage5.png?alt=media" alt=""><figcaption></figcaption></figure>

This block makes an HTTP request. Five request methods are supported:

* GET - Used to request the contents of a specified resource
* POST - Used to transfer user data to a specified resource
* PUT - Used to load the contents of the request to the URI specified in the request
* PATCH - Similar to PUT, but applies only to a fragment of the resource
* DELETE - Deletes the specified resource

The screenshot below shows the block settings with a detailed description.

<figure><img src="https://742850480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmtnl2J19CnNVA5fLFAPs%2Fuploads%2Fgit-blob-df1663d21ffee7303c83a82445335bf9f517b0e7%2Fimage1.png?alt=media" alt=""><figcaption></figcaption></figure>

1. Request method.
2. UrI specifies the path to the requested document.
3. Content type in queries (such as [POST](https://developer.mozilla.org/ru/docs/Web/HTTP/Methods/POST) or [PUT](https://developer.mozilla.org/ru/docs/Web/HTTP/Methods/PUT)), the client tells the server the type of data to send.
4. The request header can be added using the Add header button
5. Setting up a response from the server in the block:

* Response type. The response format can be in three options: json, text, base64. For json, the Data path setting is available
* The response data can be written to a variable or workflow table

**Data path**

<figure><img src="https://742850480-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmtnl2J19CnNVA5fLFAPs%2Fuploads%2Fgit-blob-3f9d96de56ad30333a658747144b6d9383a28806%2Fimage2.png?alt=media" alt=""><figcaption></figcaption></figure>

If you want to receive part of the json response data, you can use the Data path setting.For example, when the response returns this data:

{

"status": 200,

"data": {

"name": "Prices",

"values": \[

{ "id": 1, "value": 4000 },

{ "id": 2, "value": 24000 }

]

}

}

To obtain values array, write data.values as a path. And to get the first value of the array values, write data.values.0.

\\
