# `Tesla.Adapter.Hackney`
[🔗](https://github.com/elixir-tesla/tesla/blob/v1.17.0/lib/tesla/adapter/hackney.ex#L2)

Adapter for [hackney](https://github.com/benoitc/hackney).

Remember to add `{:hackney, "~> 1.13"}` to dependencies (and `:hackney` to applications in `mix.exs`)
Also, you need to recompile tesla after adding `:hackney` dependency:

```shell
mix deps.clean tesla
mix deps.compile tesla
```

## Examples

```elixir
# set globally in config/config.exs
config :tesla, :adapter, Tesla.Adapter.Hackney

# set per module
defmodule MyClient do
  def client do
    Tesla.client([], Tesla.Adapter.Hackney)
  end
end
```

## Adapter specific options

- `:max_body` - Max response body size in bytes. Actual response may be bigger because hackney stops after the last chunk that surpasses `:max_body`.

---

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