-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
We need a feature for sending a raw/binary post request. #78
Comments
Have you seen https://stackoverflow.com/a/69599480/2703456 ? |
No, I have not seen. But is this case considered there (json is sent and extracted) ?
Can you give an example? |
I'm sorry, but I don't understand what you mean. I'm beginning to doubt whether I even correctly understood your question in the first place. Maybe you could give a working |
curl -skL --data-binary '{"abc":"def"}' http://example.com |
This is not a working example, but anyway... if you want |
Oh. Thanks. I duplicated all the brackets and the request via xidel was sent successfully. Should I close the issue? Or not ? I would like to do without duplication and send data as is :) |
http://videlibri.sourceforge.net/xidel_readme.txt:
(The following commands starting with
Three ways to concat strings, of which the 3rd is using an "extended string".
In an extended string the parentheses need to be escaped:
For a simple JSON like this it's not such a big problem, but imagine this more complex JSON:
This is not fun anymore, having to manually escape all the parentheses. Luckily there's
In an extended string you obviously still have to surround it with parentheses ( Now, the string entered for
But again, better to use
|
You may also find https://stackoverflow.com/a/60890855/2703456 useful. |
No feedback, so yes, I believe this issue can be closed. |
@Reino17, Thanks for the examples. I will use the |
I would like to reopen an issue for a "similar" reason. A binary POST data upload is needed to use it with file hosting/image hosting/etc. This will help upload files without using CURL and parse the page to extract the URL after uploading :) |
Raw/binary/file post are different things
Perhaps I change it, so you can skip the serialize function, e.g. But I cannot decide whether an object like And if it was sent as JSON, someone would try it with escapes like |
@benibela, thanks for your reply ;)
This is my case :)
Does not work. GET is sent instead of POST. The header "Content-Type: multipart / form-data" doesn't help in any way either. method=POST + header "Content-Type: multipart/form-data"
header "Content-Type: multipart/form-data"
Without method=POST + header "Content-Type: multipart/form-data"
Everything is successfully sent via curl with the same parameters. :\ |
You need to put the options before the url |
Thanks, it works. It's crazy :), but the request passed with all parameters. Can you fix this in the next builds ? |
I would vote against. The fact that
Never used this feature before, but this works for me too.
This is supposed to happen? And how would
Maybe benibela understands what you mean, but I don't. So I'm curious, what exactly do you want fixed? Btw, a possible coloring bug? |
Xidel always expects HTTP/upload options before the url
I could change it for all extended strings At least for objects. Not for arrays, since they already have a meaning
Yes,
You use
Yes, it is highlighted as html when it should be xml |
The script element is the problem again. But that seems to be a bug in the XQuery standard. It says:
and HTML5 says:
|
Would it better to call such an option --post-raw, --raw-data, or --data-raw ? |
It seems to me that the name "--post-raw" is more appropriate for the option. "--raw-data" or "--data-raw" is more curl-style :) |
I'm not sure I understand. You, @benibela, yourself said:
Hence, do we really need an extra command-line option like |
It might be hard to understand for people. And curl got a lot more data options recently, even a json data option |
I quoted you, but my question was actually targeted @Baltazar500. If he doesn't know such a particular use-case, then I think this issue can be closed. |
Hi.
The inability to send raw/binary forces to use curl to generate POST requests (which for example contain json '{"aaa": "bbb"}' and cannot be sent in urlencode format).
We need a feature for sending a raw/binary post request.
The text was updated successfully, but these errors were encountered: