Specifying content-type for a POST request using std.net.curl

Joseph Rushton Wakeling via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Aug 9 10:14:27 PDT 2016


On Tuesday, 9 August 2016 at 14:21:09 UTC, ketmar wrote:
> http://dpldocs.info/experimental-docs/std.net.curl.HTTP.setPostData.html
>
> https://dlang.org/phobos/std_net_curl.html#.HTTP.setPostData
>
> reading documentation rox!

Yea, mea culpa.  I had actually glanced at that but was asking on 
the assumption that I might have misunderstood something about 
the simpler functions -- it was a bit odd that (for example) a 
`post` call whose input data was `void[]` or `ubyte[]` would 
still be treated as text content-type.

In any case, I now have a working solution using 
HTTP.setPostData, so all's well ;-)  Thanks!


More information about the Digitalmars-d-learn mailing list