xclient v0.5.1-vendored-xhttp XClient.Response View Source

Represents the response to a request.

Link to this section Summary

Functions

Returns the value of the given response header, or nil if not present

Link to this section Types

Link to this type t() View Source
t() :: %XClient.Response{
  body: String.t(),
  headers: XClient.headers(),
  status_code: non_neg_integer()
}

Link to this section Functions

Link to this function get_header(response, header_name) View Source
get_header(
  %XClient.Response{body: term(), headers: term(), status_code: term()}
  | [{String.t(), String.t()}],
  String.t()
) :: String.t() | nil

Returns the value of the given response header, or nil if not present.