Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

HTTP_Body

Returns the HTTP response headers from the last HTTP_Get or HTTP_Post request.

Known bug (kept for backward compatibility): Despite its name, HTTP_Body actually returns the response headers, not the body. The body is returned by HTTP_Header. This naming swap is a historical bug that has been preserved to avoid breaking existing scripts.

Returns an empty string if no HTTP request has been made or the character is disconnected.

Возвращает HTTP-заголовки ответа от последнего запроса HTTP_Get или HTTP_Post.

Известный баг (сохранён для обратной совместимости): Несмотря на название, HTTP_Body на самом деле возвращает заголовки ответа, а не тело. Тело возвращается через HTTP_Header. Эта путаница имён — исторический баг, сохранённый, чтобы не ломать существующие скрипты.

Возвращает пустую строку, если HTTP-запрос не выполнялся или персонаж не подключён.

Pascal

function HTTP_Body: String;

Python

def HTTP_Body() -> str: ...

Pascal Example

begin
  HTTP_Get('https://httpbin.org/get');
  AddToSystemJournal('Response headers (via HTTP_Body): ' + HTTP_Body);
  AddToSystemJournal('Response body (via HTTP_Header): ' + HTTP_Header);
end.

Python Example

HTTP_Get('https://httpbin.org/get')
AddToSystemJournal(f'Response headers (via HTTP_Body): {HTTP_Body()}')
AddToSystemJournal(f'Response body (via HTTP_Header): {HTTP_Header()}')

See Also

HTTP_Get, HTTP_Post, HTTP_Header