Does xbuf_frurl () support HTTP_POST?
2 answers
I think you will need curl library for such a request (see http://gwan.com/developers part)
http://curl.haxx.se/libcurl/c/
and here is a sample of g-wan
0
source to share
The xbuf_frurl()
G-WAN API call can be used with HTTP_POST
when providing parameters x-www-form-urlencoded
:
xbuf_frurl(xbuf, "gwan.com", 80, HTTP_POST, "/?form", 1000, "&arg1=123&arg2=456");
BTW, the following version brings a flag HTTPS
to use SSL:
xbuf_frurl(xbuf, "gwan.com", 443, HTTPS | HTTP_POST, "/?form", 1000, "&arg1=123&arg2=456");
Both calls are more concise than libcURL, and it seems unlikely to be done in a "less verbose" way (than one line of code).
Hope it helps.
0
source to share