Repository navigation
Secret masking, pytest and Robot Framework integrations, documentation, and a round of fixes for commands that sent something other than the request.
Behavior change: with shell="powershell", a value holding a line break (a pretty-printed JSON body, a multi-line field) now raises ValueError instead of returning a command that would run the next line as PowerShell. Render such requests with shell="sh".
Documentation: https://shpaker.github.io/curlify3/
Added
mask_headersonto_curl()/to_curl_async(), plus aSENSITIVE_HEADERSconstant: the named headers stay in the command with***for their values. Auth headers keep the scheme (Bearer ***), cookies keep their names (#35).- A pytest plugin,
curlify3.pytest_plugin: a failing test's report gets the curl commands of the requests the test sent. Turn it on with--curl-on-failure,curl_on_failure = trueor thecurl_requestsfixture (#44). - A Robot Framework library,
curlify3.robot(pip install curlify3[robot]):To Curl,Log As Curl, andEnable/Disable Curl Loggingfor RequestsLibrary sessions. - A documentation site with logging recipes for every supported framework and client. The README is now a short introduction.
Changed
- An unsupported request object raises
UnsupportedRequestError, a subclass of bothTypeErrorandValueError. The message names the type, and says when the other entrypoint accepts it (#33). - The PyPI description, keywords and project links (#34).
Fixed
- Shell and file-read vectors (#45): multipart values
-Fwould parse go through--form-string, filenames with;or,are quoted, and a cookie without=no longer makes-bread a cookie file. - Urls and headers as the request carried them (#48): the raw, still-encoded path for starlette, werkzeug and django,
-gfor urls with[]{}, repeated headers kept, and empty header values sent. - Multipart bodies as they were sent (#50): one boundary, empty file inputs, and
multipart/related/multipart/mixedsent unchanged. - What each library actually sends (#52):
-X GETfor a GET with a body,-Ifor HEAD, a werkzeug form parsed before rendering, urllib's and tornado's default content-type, tornado client auth / user-agent headers, and djangoDisallowedHost.
The full list is in the changelog.