Skip to content

Importing cURL command does not include the request's body #306

@lilacse

Description

@lilacse

Version: Web app v0.35.0 (d287245)
Browser: Firefox 134.0.2 (64-bit)

Example cURL command generated with Firefox's "Copy as cURL (POSIX)" function:

curl 'https://restninja.io/in/proxy' --compressed -X POST -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0' -H 'Accept: */*' -H 'Accept-Language: en-US,en;q=0.5' -H 'Accept-Encoding: gzip, deflate, br, zstd' -H 'Origin: https://restninja.io' -H 'DNT: 1' -H 'Sec-GPC: 1' -H 'Connection: keep-alive' -H 'Referer: https://restninja.io/' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' -H 'TE: trailers' --data-raw '{"body":"ewogICAgInByb3AiOiAxMjM0Cn0=","method":"POST","uri":"http://httpbin.org/post","headers":[],"auth":{"_t":"None"}}'

With Firefox's "Copy as cURL (Windows)" function:

curl "https://restninja.io/in/proxy" --compressed -X POST -H "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0" -H "Accept: */*" -H "Accept-Language: en-US,en;q=0.5" -H "Accept-Encoding: gzip, deflate, br, zstd" -H "Origin: https://restninja.io" -H "DNT: 1" -H "Sec-GPC: 1" -H "Connection: keep-alive" -H "Referer: https://restninja.io/" -H "Sec-Fetch-Dest: empty" -H "Sec-Fetch-Mode: cors" -H "Sec-Fetch-Site: same-origin" -H "TE: trailers" --data-raw "{""body"":""ewogICAgInByb3AiOiAxMjM0Cn0="",""method"":""POST"",""uri"":""http://httpbin.org/post"",""headers"":^[^],""auth"":{""_t"":""None""}}"

With Chrome's "Copy as cURL (bash)":

curl 'https://restninja.io/in/proxy' \
  -H 'accept: */*' \
  -H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8' \
  -H 'cookie: _ga_JQXWSK7VEK=GS1.1.1737824556.1.0.1737824556.0.0.0; _ga=GA1.2.1794086968.1737824556; _gid=GA1.2.153220846.1737824556; _gat_gtag_UA_2652919_3=1; sc_is_visitor_unique=rx12865986.1737824557.1C3356BE17DF4F6388E6554EAA9543B9.1.1.1.1.1.1.1.1.1; fpestid=3Imo-s_4xCEdLlYgqpeayp6LlH8U4osgsUAbVTyYQ80YPaSwWEFnWTzrMZxbHMt9_KYqGg; _cc_id=a1405834f5b8d0b9a8df31d04c7d3efa; panoramaId_expiry=1737910958742; twk_idm_key=ObU2AdTki0GszXdOE6vTr; TawkConnectionTime=0; twk_uuid_5ae071e9227d3d7edc24b9dc=%7B%22uuid%22%3A%221.Sww8kNgHf8PApt3jZYdkqIw4OsdAnahoHwG87OOngSx4mxhxCPCkebftcqiMlatJizLVutKb6wyWRBUgYBtWbrIKUszZPFUHiNoocPlgVJRCxRXM38DG0%22%2C%22version%22%3A3%2C%22domain%22%3A%22restninja.io%22%2C%22ts%22%3A1737824561436%7D' \
  -H 'origin: https://restninja.io' \
  -H 'priority: u=1, i' \
  -H 'referer: https://restninja.io/' \
  -H 'sec-ch-ua: "Chromium";v="125", "Not.A/Brand";v="24"' \
  -H 'sec-ch-ua-mobile: ?0' \
  -H 'sec-ch-ua-platform: "Windows"' \
  -H 'sec-fetch-dest: empty' \
  -H 'sec-fetch-mode: cors' \
  -H 'sec-fetch-site: same-origin' \
  -H 'user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36' \
  --data-raw '{"body":"eyJ0ZXN0IjogMTIzNH0=","method":"POST","uri":"http://httpbin.org/post","headers":[],"auth":{"_t":"None"}}'

With Chrome's "Copy as cURL (cmd)":

curl "https://restninja.io/in/proxy" ^
  -H "accept: */*" ^
  -H "accept-language: en-GB,en-US;q=0.9,en;q=0.8" ^
  -H ^"cookie: _ga_JQXWSK7VEK=GS1.1.1737824556.1.0.1737824556.0.0.0; _ga=GA1.2.1794086968.1737824556; _gid=GA1.2.153220846.1737824556; _gat_gtag_UA_2652919_3=1; sc_is_visitor_unique=rx12865986.1737824557.1C3356BE17DF4F6388E6554EAA9543B9.1.1.1.1.1.1.1.1.1; fpestid=3Imo-s_4xCEdLlYgqpeayp6LlH8U4osgsUAbVTyYQ80YPaSwWEFnWTzrMZxbHMt9_KYqGg; _cc_id=a1405834f5b8d0b9a8df31d04c7d3efa; panoramaId_expiry=1737910958742; twk_idm_key=ObU2AdTki0GszXdOE6vTr; TawkConnectionTime=0; twk_uuid_5ae071e9227d3d7edc24b9dc=^%^7B^%^22uuid^%^22^%^3A^%^221.Sww8kNgHf8PApt3jZYdkqIw4OsdAnahoHwG87OOngSx4mxhxCPCkebftcqiMlatJizLVutKb6wyWRBUgYBtWbrIKUszZPFUHiNoocPlgVJRCxRXM38DG0^%^22^%^2C^%^22version^%^22^%^3A3^%^2C^%^22domain^%^22^%^3A^%^22restninja.io^%^22^%^2C^%^22ts^%^22^%^3A1737824561436^%^7D^" ^
  -H "origin: https://restninja.io" ^
  -H "priority: u=1, i" ^
  -H "referer: https://restninja.io/" ^
  -H ^"sec-ch-ua: ^\^"Chromium^\^";v=^\^"125^\^", ^\^"Not.A/Brand^\^";v=^\^"24^\^"^" ^
  -H "sec-ch-ua-mobile: ?0" ^
  -H ^"sec-ch-ua-platform: ^\^"Windows^\^"^" ^
  -H "sec-fetch-dest: empty" ^
  -H "sec-fetch-mode: cors" ^
  -H "sec-fetch-site: same-origin" ^
  -H "user-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36" ^
  --data-raw ^"^{^\^"body^\^":^\^"eyJ0ZXN0IjogMTIzNH0=^\^",^\^"method^\^":^\^"POST^\^",^\^"uri^\^":^\^"http://httpbin.org/post^\^",^\^"headers^\^":^[^],^\^"auth^\^":^{^\^"_t^\^":^\^"None^\^"^}^}^"

When importing either of these cURL commands into Restfox, the request body seems to be dropped. Everything else seems to be imported correctly.

Image

I just started using Restfox a few days ago and I'm really loving it <3 Please let me know if you need any more information related to this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions