---
title: "hackney 4.0.0 Breaking Changes on Hex | Since.dev"
description: "What each hackney release removed, renamed or changed: 28 breaking changes in 4 versions on Hex, each with its source."
canonical_url: https://since.dev/packages/hex/hackney
last_updated: 2026-12-04
---

# hackney breaking changes

hackney 4.0.0 (April 16, 2026) is its newest release with breaking changes, 6 of them. The first: Removed hackney_metrics. Every breaking API change we have recorded in hackney on Hex: 28 breaking changes in 4 versions. Below, its 4 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `4.12.5`, released November 30, 2026. Apache-2.0 license. [Source repository](https://github.com/benoitc/hackney)

- From [3.0.0](#v-3-0-0) to [4.0.0](#v-4-0-0): 6 breaking changes in 1 version.
- From [2.0.0](#v-2-0-0) to [4.0.0](#v-4-0-0): 12 breaking changes in 2 versions.

## hackney 4.0.0 breaking changes

hackney 4.0.0, released April 16, 2026: 6 breaking changes.

- **Removed** `hackney_metrics`  

The hackney_metrics modules are gone and the metrics_backend app env is no longer read. Use the middleware chain with prometheus or telemetry instead; pool stats remain via hackney_pool:get_stats/1. [github.com](https://github.com/benoitc/hackney/releases/tag/4.0.0)
- **Removed** `hackney_metrics_backend`  

The hackney_metrics modules are gone and the metrics_backend app env is no longer read. Use the middleware chain with prometheus or telemetry instead; pool stats remain via hackney_pool:get_stats/1. [github.com](https://github.com/benoitc/hackney/releases/tag/4.0.0)
- **Removed** `hackney_metrics_dummy`  

The hackney_metrics modules are gone and the metrics_backend app env is no longer read. Use the middleware chain with prometheus or telemetry instead; pool stats remain via hackney_pool:get_stats/1. [github.com](https://github.com/benoitc/hackney/releases/tag/4.0.0)
- **Removed** `hackney_metrics_prometheus`  

The hackney_metrics modules are gone and the metrics_backend app env is no longer read. Use the middleware chain with prometheus or telemetry instead; pool stats remain via hackney_pool:get_stats/1. [github.com](https://github.com/benoitc/hackney/releases/tag/4.0.0)
- **Removed** `metrics_backend`  

The metrics_backend application environment key is no longer read; configure the middleware chain instead. [github.com](https://github.com/benoitc/hackney/releases/tag/4.0.0)
- **Behavior changed** `hackney:request.5`  

Low-level HTTP/2 and HTTP/3 message tags and modules moved to erlang_h2 and erlang_quic. Code relying on those low-level internals must be updated; hackney:request/5 itself is unchanged. [github.com](https://github.com/benoitc/hackney/releases/tag/4.0.0)

## hackney 3.0.0 breaking changes

hackney 3.0.0, released January 27, 2026: 6 breaking changes.

- **Removed** `hackney:body.1`  

hackney:body/1 has been removed. Use the body returned directly in the response tuple instead. [github.com](https://github.com/benoitc/hackney/blob/3.0.0/NEWS.md)
- **Removed** `hackney:body.2`  

hackney:body/2 has been removed. Use the body returned directly in the response tuple instead. [github.com](https://github.com/benoitc/hackney/blob/3.0.0/NEWS.md)
- **Removed** `hackney:skip_body.1`  

hackney:skip_body/1 has been removed. The body is always consumed, so calls to it can simply be deleted. [github.com](https://github.com/benoitc/hackney/blob/3.0.0/NEWS.md)
- **Removed** `hackney:stream_body.1`  

hackney:stream_body/1 has been removed. Switch to async mode, using \[async\] or \[{async, once}\] for streaming. [github.com](https://github.com/benoitc/hackney/blob/3.0.0/NEWS.md)
- **Behavior changed**  

Authorization headers and credentials are no longer sent when a redirect goes to a different host. Pass the location_trusted option as true to restore the old behavior, which is not recommended. [github.com](https://github.com/benoitc/hackney/blob/3.0.0/NEWS.md)
- **Behavior changed** `hackney:get`  

hackney:get and the other high-level calls now return the body in the response tuple instead of a connection pid. Code that calls hackney:body on the pid must be changed to use the body from the tuple. [github.com](https://github.com/benoitc/hackney/blob/3.0.0/NEWS.md)

## hackney 2.0.0 breaking changes

hackney 2.0.0, released January 20, 2026: 3 breaking changes.

- **Behavior changed**  

Header values containing CRLF sequences are sanitized, so code that relied on injecting them will change behavior. [github.com](https://github.com/benoitc/hackney/blob/2.0.0/NEWS.md)
- **Behavior changed**  

Basic auth and cookies are no longer forwarded when following redirects to a different host. Pass location_trusted true to forward them again. [github.com](https://github.com/benoitc/hackney/commit/8f944559bdb83da60b5c06f6cf6d842591278364)
- **Behavior changed** `stream_to`  

For async requests, the stream_to process owns the connection, so the connection ends if stream_to dies. [github.com](https://github.com/benoitc/hackney/blob/2.0.0/NEWS.md)

## hackney 2.0.0-beta.1 breaking changes

hackney 2.0.0-beta.1, released January 20, 2026: 13 breaking changes.

- **Removed**  

SOCKS5 and HTTP CONNECT proxy support is removed in 2.0.0 and was planned to return in 2.1.0. [github.com](https://github.com/benoitc/hackney/blob/2.0.0/NEWS.md)
- **Removed** `cancel_request.1`  

cancel_request/1 is gone in 2.0.0. Call close/1 on the connection instead. [github.com](https://github.com/benoitc/hackney/blob/2.0.0/NEWS.md)
- **Removed** `controlling_process.2`  

controlling_process/2 is gone in 2.0.0 and no replacement is given; the notes say it is not needed. [github.com](https://github.com/benoitc/hackney/blob/2.0.0/NEWS.md)
- **Removed** `hackney_connect`  

hackney_connect is replaced by hackney_conn, which manages connections. [github.com](https://github.com/benoitc/hackney/blob/2.0.0/NEWS.md)
- **Removed** `send_multipart_body.2`  

send_multipart_body/2 is gone in 2.0.0. Use send_body/2 instead. [github.com](https://github.com/benoitc/hackney/blob/2.0.0/NEWS.md)
- **Renamed** `hackney_headers_new`  

The headers module is renamed. Update calls to use hackney_headers. [github.com](https://github.com/benoitc/hackney/blob/2.0.0/NEWS.md)
- **Behavior changed**  

The pool limit is now per host via max_per_host, defaulting to 50 connections. [github.com](https://github.com/benoitc/hackney/blob/2.0.0/NEWS.md)
- **Behavior changed**  

Credentials and cookies are no longer forwarded to a different host on redirect by default. Set location_trusted to true to restore the old behavior. [github.com](https://github.com/benoitc/hackney/blob/2.0.0/NEWS.md)
- **Behavior changed**  

Idle pooled connections now time out after at most 2 seconds. [github.com](https://github.com/benoitc/hackney/blob/2.0.0/NEWS.md)
- **Behavior changed**  

hackney 2.0.0 requires Erlang/OTP 27 or newer. [github.com](https://github.com/benoitc/hackney/blob/2.0.0/NEWS.md)

And 3 more in this version. [Sign up to see every change](https://app.since.dev/login?mode=signup&src=package-page)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
