HttpResponse Class
An HTTP response object.
- Inheritance
-
azure.functions._abc.HttpResponseHttpResponse
Constructor
HttpResponse(body=None, *, status_code=None, headers=None, mimetype=None, charset=None)
Parameters
Name | Description |
---|---|
body
|
<xref:<xref:str/bytes>>
Optional response body. Default value: None
|
status_code
Required
|
Response status code. If not specified, defaults to 200. |
headers
Required
|
An optional mapping containing response HTTP headers. |
mimetype
Required
|
An optional response MIME type. If not specified, defaults to
|
charset
Required
|
Response content text encoding. If not specified, defaults to
|
Keyword-Only Parameters
Name | Description |
---|---|
status_code
Required
|
|
headers
Required
|
|
mimetype
Required
|
|
charset
Required
|
|
Methods
get_body |
Response body as a bytes object. |
get_body
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.
Collaborate with us on GitHub
The source for this content can be found on GitHub, where you can also create and review issues and pull requests. For more information, see our contributor guide.
Azure SDK for Python