Skip to content
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

docs don't specify how to POST an unnamed value (like a SOAP request) #23

Open
eflister opened this issue Oct 20, 2020 · 1 comment
Open

Comments

@eflister
Copy link

i needed to replicate curl's option for a soap request:

     --data-binary <data> HTTP POST binary data

the server won't accept multipart as with CurlHttpPost. the docs for CurlPostFields (at top of https://hackage.haskell.org/package/curl-1.3.8/docs/Network-Curl-Post.html and https://hackage.haskell.org/package/curl-1.3.8/docs/Network-Curl.html#v:curlPost) indicate it should be a list of name=value Strings, so i was stuck for a long time looking for some other option that didn't involve naming the value. eventually it occurred to me to just try it without a name, which worked.

i also had to use CurlHttpHeaders to set content-type: text/xml;charset='utf-8', why isn't there an explicit constructor for this as in HttpPost or CurlReferer, CurlUserAgent, CurlCookie, etc?

@defanor
Copy link

defanor commented Nov 2, 2022

I was briefly stuck on that too; the libcurl naming of that option is somewhat confusing, but the CURLOPT_POSTFIELDS documentation mentions that it's neither converted nor encoded, while that in the bindings sounds rather like it has to be in the "name=value" format.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants