Skip to main content

Response.headers

headers

Group: Metadata

Documentation

Get the response headers. It returns a vector of Header objects and not a mapping, because the response may contain multiple headers with the same name.

Examples

Getting the headers from a response.

Note: This example will make a network request.

      import Standard.Examples

example_headers = Examples.get_response.headers

Creating a mapping from the headers, throwing an error if there are duplicates.

Note: This example will make a network request.

      import Standard.Examples

example_headers = Dictionary.from_vector error_on_duplicates=True (Examples.get_response.headers.map h-> [h.name, h.value])