HttpResponse class

Definition

An HTTP response object.

HttpResponse(body=None, *, status_code=None, headers=None, mimetype=None, charset=None)
Inheritance
azure.functions._abc.HttpResponse
HttpResponse

Parameters

body
str/bytes

Optional response body.

status_code
int

Response status code. If not specified, defaults to 200.

headers
dict

An optional mapping containing response HTTP headers.

mimetype
str

An optional response MIME type. If not specified, defaults to 'text/plain'.

charset
str

Response content text encoding. If not specified, defaults to 'utf-8'.

Methods

get_body() -> bytes

Response body as a bytes object.

get_body() -> bytes

Response body as a bytes object.

get_body() -> bytes

Attributes

charset

Response text encoding.

headers

A dictionary of response HTTP headers.

mimetype

Response MIME type.

status_code

Response status code.