Skip to content

0.14

Choose a tag to compare

@shpaker shpaker released this 16 Oct 19:27
· 15 commits to main since this release

Header filtering and Python 3.15.

  • include_headers / exclude_headers on to_curl() and to_curl_async() filter the rendered headers by name, case-insensitively (#30). include_headers narrows first, exclude_headers subtracts from what is left; Cookie counts as a header, so dropping it drops -b too. Only the printed arguments change, the body is rendered as before. A bare str, or a name that is not a str, raises TypeError.
  • Python 3.15 support: the classifier, and 3.15 in the CI matrix (Linux, plus the Windows end-to-end job on 3.10 and 3.15).
to_curl(req, exclude_headers=["user-agent", "accept-encoding", "accept", "connection"])
to_curl(req, include_headers=["authorization", "content-type"])