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_Bodyactually 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-запрос не выполнялся или персонаж не подключён.
function HTTP_Body: String;
def HTTP_Body() -> str: ...
begin
HTTP_Get('https://httpbin.org/get');
AddToSystemJournal('Response headers (via HTTP_Body): ' + HTTP_Body);
AddToSystemJournal('Response body (via HTTP_Header): ' + HTTP_Header);
end.
HTTP_Get('https://httpbin.org/get')
AddToSystemJournal(f'Response headers (via HTTP_Body): {HTTP_Body()}')
AddToSystemJournal(f'Response body (via HTTP_Header): {HTTP_Header()}')