Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDocumentation example showing how to post raw JSON to some route #882
Labels
Comments
|
You are right, this should be made more clear in the docs. This is how you would make the same request with httpie: $ echo '{ "_source": [ "restricted_countries.*" ], "query": { "match_all": {} }, "size": 1000 }' \
| http :9200/_searchI.e., pass the raw request data through (You don’t need to explicitly specify that you want POST, JSON content-type, nor localhost — those are the defaults.) |
Repository owner
deleted a comment
May 2, 2020
Repository owner
deleted a comment from
naeim249
May 10, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's not clear from the website's documentation, or the
--helpoutput, how to do the following equivalent curl task:Post a raw JSON query to ElasticSearch:
The examples seem to show how to post form values and other stuff.
It would be great if there was a way to do this, and if it was documented in all places, such that searching for "httpie post json" would show the answer in the search result context of Google's top hits.
After a quick read of the documentation, I'm not even sure if it's possible, but I didn't dig that deep.