View Source HTTPSpec.Response (http_spec v1.1.0)

A struct for describing HTTP response.

Summary

Types

@type body() :: binary() | nil
@type headers() :: [{header_name :: String.t(), header_value :: String.t()}]
@type status() :: non_neg_integer()
@type t() :: %HTTPSpec.Response{
  body: body(),
  headers: headers(),
  status: status(),
  trailers: headers()
}

Functions

@spec build(keyword() | map()) :: {:ok, t()} | {:error, HTTPSpec.ArgumentError.t()}
@spec build!(keyword() | map()) :: t()