Curlconverter Versions Save

Transpile curl commands into Python, JavaScript and 27 other languages

v4.9.0

3 months ago

BREAKING CHANGE: the JSON generator (curlconverter.toJsonString()), when the request body can't be parsed as JSON or as a query string (when the Content-Type header is set to application/json or application/x-www-form-urlencoded respectively), now outputs it as just a string, like this: "data": "unparsabledata". Previously, it would generate a one element dictionary with the data as the first key, like "data": {"unparsabledata": ""}.

New generators:

  • Python + http.client
  • Perl
  • Julia
  • Lua

Minor changes:

  • if Node + request has invalid characters in the URL, wrap it in encodeURI()

v4.8.1

5 months ago
  • Generate Objective-C
  • Improve parsing of --form/-F values (support quotes like --form 'name="some value"' and parse out ;filename=, ;type= values. ;headers= and ;encoder= are not used by any generators)

v4.8.0

8 months ago

New code generators:

  • PowerShell
  • JavaScript + jQuery
  • JavaScript + XHR
  • Node + http
  • Node + SuperAgent
  • Node + Ky
  • Java + HttpClient (and this is now the default for java)
  • Java + OkHttp
  • Java + jsoup
  • Swift
  • Kotlin
  • OCaml

Minor changes:

  • indent Java with 4 spaces instead of tabs
  • fixes to Dart
  • go back to depending on the upstream node-tree-sitter instead of our fork
  • add some more Wget options and one more PHP option (--unix-socket)

v4.7.1

11 months ago

Actually prebuild binaries, installing should no longer require Python

v4.7.0

11 months ago
  • Support multiple curl commands in input (for some generators)
  • Wget
  • HTTPie
  • PHP + Guzzle
  • HTTP
  • find the first curl command in Bash pipelines
  • Node 20 support

v4.6.0

1 year ago
  • Generate Clojure + clj-http
  • Generate HAR
  • Support more curl arguments in Ansible + ansible.builtin.uri generator
  • Node 19 support

Minor changes:

  • Indent generated JavaScript code with 2 spaces
  • Fix converting all data to bytes in Python
  • Don't remove redundant Content-Type header from Python output unless it's the only header
  • Output correct filename from --form in Go
  • Warn that curlconverter doesn't support curl's URL globbing syntax

v4.5.0

1 year ago
  • Generate Node.js + Got code
  • Support multiple URLs and --next (for Python, other languages use the first URL)
  • --url-query, --proto-default, --http3-only
  • Merge repeated headers' values
  • Generate code that gets env variables and runs subcommands at runtime for most languages that allow it
  • Fix $ in strings being incorrectly interpreted as env variables
  • Support --form, --max-time, --insecure and --compressed in Go
  • Improve serialization of data as strings in Rust, Ruby, R, MATLAB, Elixir, Dart and C#
  • JSON data is converted to a JS object in JSON output instead of being a string

Minor changes:

  • Fix curlconverter -
  • Parse URLs similarly to how curl parses them
  • JSON outputs follow_redirects, timeout, connect_timeout and auth_type/aws_sigv4/delegation
  • Remove backslash escapes from URL
  • PHP headers are now (correctly) regular arrays instead of associative arrays
  • Fix parsing of single quote Bash strings (backslashes were incorrectly escaping newlines and single quotes)
  • --compressed in C#
  • Go deprecated ioutil.ReadAll for io.ReadAll()

v4.4.1

1 year ago
  • Added --range --oauth2-bearer --basic and --time-cond support to all converters
  • Added --cookie-jar --location --location-trusted --max-redirs --max-time --connect-timeout --aws-sigv4 --negotiate --delegation --ntlm and --ntlm-wb support to Python

v4.4.0

1 year ago
  • Support commands that mix --data/--data-ascii, --data-raw, --data-binary, --data-urlencode and --json
  • Proper string escaping when generating Python, JavaScript, Java and PHP
  • When converting JSON to Python code, checking if the result will serialize exactly like the input is more correct
  • Convert --data-urlencode name@file to a Python dictionary/list and other improvements
  • Basic support for ${parameter_expansion}
  • Reworked Elixir generator
  • Removed Strest generator

v4.3.0

1 year ago
  • new C# generator using HttpClient
  • support for --form/-F for Dart