[GH-ISSUE #1195] Exporting to cURL doesn't include JSON raw data #411

Closed
opened 2026-03-16 15:10:15 +03:00 by kerem · 3 comments
Owner

Originally created by @LuisMayo on GitHub (Sep 29, 2020).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1195

Originally assigned to: @liyasthomas on GitHub.

Describe the bug
When trying to generate cURL of a petition when the JSON has been specified without processing, the cURL-generated code doesn't include said JSON

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://hoppscotch.io/
  2. Change petition method to POST
  3. Enable the "unprocessed data" switch
  4. Write a minimum JSON object on the text area. Something like this may work.
{
    "test": 1
}
  1. Click the "show code" button
  2. Select "cURL" under petition type

Expected behavior
When generating the code, the argument to cURL's "-d" flag should be the JSON I typed, instead of an empty JSON*

*It isn't actual an empty JSON, it's a JSON made using the parameters list if you disable the unprocessed data switch

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser: MS Edge(chromium)
  • Version: 85.0.564.63
Originally created by @LuisMayo on GitHub (Sep 29, 2020). Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/1195 Originally assigned to: @liyasthomas on GitHub. **Describe the bug** When trying to generate cURL of a petition when the JSON has been specified without processing, the cURL-generated code doesn't include said JSON **To Reproduce** Steps to reproduce the behavior: 1. Go to https://hoppscotch.io/ 2. Change petition method to POST 3. Enable the "unprocessed data" switch 4. Write a minimum JSON object on the text area. Something like this may work. ```JSON { "test": 1 } ``` 5. Click the "show code" button 6. Select "cURL" under petition type **Expected behavior** When generating the code, the argument to cURL's "-d" flag should be the JSON I typed, instead of an empty JSON* *It isn't actual an empty JSON, it's a JSON made using the parameters list if you disable the unprocessed data switch **Screenshots** ![image](https://user-images.githubusercontent.com/20229636/94543049-dab38b80-0249-11eb-89c3-4989809210e1.png) **Desktop (please complete the following information):** - OS: Windows 10 - Browser: MS Edge(chromium) - Version: 85.0.564.63
kerem 2026-03-16 15:10:15 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@liyasthomas commented on GitHub (Sep 29, 2020):

Thanks for reporting the issue. It seems like only key-value pair data is being take into consideration for code gen. Will fix this ASAP.

<!-- gh-comment-id:700597442 --> @liyasthomas commented on GitHub (Sep 29, 2020): Thanks for reporting the issue. It seems like only key-value pair data is being take into consideration for code gen. Will fix this ASAP.
Author
Owner

@LuisMayo commented on GitHub (Sep 29, 2020):

Thanks to you for answering so quickly!

<!-- gh-comment-id:700601648 --> @LuisMayo commented on GitHub (Sep 29, 2020): Thanks to you for answering so quickly!
Author
Owner

@liyasthomas commented on GitHub (Sep 29, 2020):

This issues was a result of a typo in codegen function. Instead of rawInput it was rawInputs. Pushing a fix now.

<!-- gh-comment-id:700893376 --> @liyasthomas commented on GitHub (Sep 29, 2020): This issues was a result of a typo in codegen function. Instead of `rawInput` it was `rawInputs`. Pushing a fix now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#411
No description provided.