HTTPower.Response (HTTPower v0.22.0)

Copy Markdown View Source

HTTP response struct from HTTPower.

This struct completely abstracts away the underlying HTTP library and provides a clean, consistent interface.

Body Decoding

Response bodies with a JSON Content-Type (application/json or +json suffix) are automatically decoded into Elixir data structures. All other content types return the raw binary body. Use raw: true in request options to skip decoding.

Summary

Types

t()

@type t() :: %HTTPower.Response{
  body: term(),
  headers: %{optional(String.t()) => [String.t()]},
  status: integer()
}