NAME
HTTP::API::Core::Response - HTTP API response object
RESPONSE BODY
content
Returns the raw response body exactly as supplied by the transport.
text
An alias for content. No charset transcoding is performed.
has_content
Returns true when the raw response body has non-zero length.
json
Decodes the response body as JSON. An empty or whitespace-only body returns undef. JSON decoding is explicit: json attempts to decode regardless of the response Content-Type header, and throws a structured decode error when non-empty content is not valid JSON.
CONTENT TYPE
content_type
Returns the lower-cased media type from Content-Type, excluding parameters such as charset. Returns undef when the header is absent.
is_json
Returns true for application/json and structured syntax suffix media types ending in +json, such as application/problem+json.
METADATA
status, reason, headers, header, method, url
Provide response status and request metadata. headers returns a copy.
elapsed
Returns transport elapsed time when available.
request_id
Returns the first non-empty X-Request-Id, Request-Id, or X-Correlation-Id value.