# `Waffle.HTTPClient`
[🔗](https://github.com/elixir-waffle/waffle/blob/v2.0.0/lib/waffle/behaviors/http_client.ex#L1)

Defines the behavior for http client.

# `body`

```elixir
@type body() :: binary()
```

# `error`

```elixir
@type error() ::
  :timeout
  | {:unexpected_status, status()}
  | :response_body_limit_exceeded
  | :http_client
```

# `error_response`

```elixir
@type error_response() :: %Waffle.HTTPClient.Error{
  error: error(),
  error_context: term(),
  request: term()
}
```

# `filename`

```elixir
@type filename() :: String.t()
```

# `header`

```elixir
@type header() :: {String.t(), String.t()}
```

# `headers`

```elixir
@type headers() :: [header()]
```

# `option`

```elixir
@type option() ::
  {:max_redirects, non_neg_integer() | nil}
  | {:max_retries, non_neg_integer()}
  | {:receive_timeout_ms, non_neg_integer()}
  | {:connect_timeout_ms, non_neg_integer()}
  | {:max_body_length_bytes, non_neg_integer() | nil}
  | {:backoff_factor_ms, non_neg_integer()}
  | {:backoff_max_ms, non_neg_integer()}
```

# `options`

```elixir
@type options() :: [option()]
```

# `response`

```elixir
@type response() :: %Waffle.HTTPClient.Response{
  body: body(),
  filename: filename() | nil
}
```

# `status`

```elixir
@type status() :: 100..599
```

# `url`

```elixir
@type url() :: String.t()
```

# `get`

```elixir
@callback get(url(), headers(), options()) ::
  {:ok, response()} | {:error, error_response()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
