question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for sending body data that isn't in key:value format

See original GitHub issue

We should support somehow sending request body data as raw string. Without the requirement of providing key=value pair. This is related to jkbrzt/httpie#399 . In the httpie library, the issue is solved by command input redirection… Eg.:

echo 'some string value' | http POST example.com/person/1

Which sort of complicates things for this library… I’m not sure how we should approach this.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
foginecommented, Sep 19, 2016

IPython uses an exclamation mark to prefix a shell command.

@eliangcs , that is certainly better, I’d rather introduce new command sh or shell instead of explanation mark which could take unquoted, squoted or dquoted string as an argument… I think it would be more transparent that way …

The example would become:

shell echo 'some string value' | post example.com/person/1 | shell grep "abc" | post /upload 

Edit: As I think about it, the explanation mark is good as well…

1reaction
BoboTiGcommented, Sep 7, 2021

The feature has been added to HTTPie (--raw option, https://github.com/httpie/httpie/tree/master/docs#request-data-via---raw). It will be made available for HTTP Prompt for the next HTTPie release (soon).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add a Request Body to a POST Request | API Connector
Try adding in a content type into the header as described above, where Key = content-type, and Value = application/json. Only JSON request...
Read more >
Difference Between form-data, x-www-form-urlencoded and ...
We need to enter the key-value pairs for sending the request body to the server, and Postman will encode the desired data before...
Read more >
Building requests | Postman Learning Center
The Body tab in Postman allows you to specify the data you need to send with a request. You can send various different...
Read more >
Accepting Raw Request Body Content in ASP.NET Core API ...
Lets start with a non-raw request, but rather with posting a string as JSON since that is very common. You can accept a...
Read more >
JSON POST request using app sends empty body · Issue #8455
Setting Raw JSON for type in Body, putting valid JSON in the Body field, and sending. Endpoint receives request with right Content-Length ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found