# Блок "HTTP-запрос"

Блок "HTTP-запрос" имеет возможность обработать ответ от сервера с помощью JavaScript.&#x20;

<div align="center"><figure><img src="/files/zjXBUYd2BUVrXkqkvUxa" alt=""><figcaption></figcaption></figure></div>

### Объект response

Ответ от сервера записывается в JavaScript объект `response`.

```javascript
var statusCode = response.status; // Код ответа от сервера
var rawBody = response.body; // Сырое тело ответа от сервера
var jsonData = response.data; // Объект ответа от сервера, если тело ответа было в формате JSON  
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.watbot.ru/js-api/blok-http-zapros.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
