POST request with std.net.curl
frame
frame86 at live.com
Sat Jul 24 06:01:25 UTC 2021
On Friday, 23 July 2021 at 21:25:01 UTC, bachmeier wrote:
> Authorization is working - it's the same whether I'm doing a
> GET or POST request. The problem is passing the data. The main
> problem is that the documentation doesn't explain how to
> translate a `--data` option into a `post` call. I've tried
> everything I can think of, including what's shown in the
> documentation, but haven't found anything that works.
You just need to supply a JSON encoded string for the data - from
an object like std.json.JSONValue via its toString() method for
example.
More information about the Digitalmars-d-learn
mailing list