HttpResponse object
The attributes associated with an HTTP response.
On this page
Fields
-
body (
String
)The HTTP response body as a plain string. Use this field when the body is not in JSON format.
-
header (
HttpResponseHeader
)An HTTP header.
Argument Description name
(String!
) requiredA case-insensitive header name.
-
jsonBody (
JSON
)The HTTP response body parsed as JSON. If the body is valid JSON, it will be parsed and returned as a JSON object. If parsing fails, then raw body is returned as a string. Use this field when you expect the response to be JSON, or when you're dealing with mixed response types, meaning both JSON and non-JSON. Using this field reduces function instruction consumption and ensures that the data is formatted in logs. To prevent increasing the function target input size unnecessarily, avoid querying both
body
andjsonBody
simultaneously. -
status (
Int!
)The HTTP status code.
Types that return HttpResponse
Deprecated fields
-
headers (
[HttpResponseHeader!]!
) deprecatedThe HTTP headers.
Deprecation warning
Use
header
instead.
The attributes associated with an HTTP response.
On this page
Fields
-
body (
String
)The HTTP response body as a plain string. Use this field when the body is not in JSON format.
-
header (
HttpResponseHeader
)An HTTP header.
Argument Description name
(String!
) requiredA case-insensitive header name.
-
jsonBody (
JSON
)The HTTP response body parsed as JSON. If the body is valid JSON, it will be parsed and returned as a JSON object. If parsing fails, then raw body is returned as a string. Use this field when you expect the response to be JSON, or when you're dealing with mixed response types, meaning both JSON and non-JSON. Using this field reduces function instruction consumption and ensures that the data is formatted in logs. To prevent increasing the function target input size unnecessarily, avoid querying both
body
andjsonBody
simultaneously. -
status (
Int!
)The HTTP status code.
Types that return HttpResponse
Deprecated fields
-
headers (
[HttpResponseHeader!]!
) deprecatedThe HTTP headers.
Deprecation warning
Use
header
instead.
The attributes associated with an HTTP response.
On this page
Fields
-
body (
String
)The HTTP response body as a plain string. Use this field when the body is not in JSON format.
-
status (
Int!
)The HTTP status code.
Types that return HttpResponse
Deprecated fields
-
headers (
[HttpResponseHeader!]!
) deprecatedThe HTTP headers.
Deprecation warning
Use
header
instead.
The attributes associated with an HTTP response.
On this page
Fields
-
body (
String
)The HTTP response body as a plain string. Use this field when the body is not in JSON format.
-
status (
Int!
)The HTTP status code.
Types that return HttpResponse
Deprecated fields
-
headers (
[HttpResponseHeader!]!
) deprecatedThe HTTP headers.
Deprecation warning
Use
header
instead.
The attributes associated with an HTTP response.
On this page
Fields
-
body (
String
)The HTTP response body as a plain string. Use this field when the body is not in JSON format.
-
status (
Int!
)The HTTP status code.
Types that return HttpResponse
Deprecated fields
-
headers (
[HttpResponseHeader!]!
) deprecatedThe HTTP headers.
Deprecation warning
Use
header
instead.