I took the “http_get” example and tried to send the values (e.g. value=123 ) with POST instead of GET.
I’ve looked through the manual and different topics in forum, but I couldn’t find a solution where to place the value for a HTTP POST.
I also tried with WIP_COPT_HTTP_HEADER and other possible headers, but with no success.
Does anyone know how to do it?
(With GET it was no problem, I just had to add the values on the url, e.g testxme.com/test.php?value=123 )
const ascii * HTTP_STR_URL = "http://testxme.com/test.php"; /* HTTP POST command */ http_ClientTestCtx.DataChannel = wip_getFileOpts ( http_ClientTestCtx.CnxChannel, /* session channel */ (ascii *) HTTP_STR_URL, /* requested URL */ http_ClientTestDataHandler, /* data handler */ &http_ClientTestCtx, /* context */ WIP_COPT_HTTP_METHOD, WIP_HTTP_METHOD_POST, /* request headers*/ WIP_COPT_HTTP_HEADER, "Content-Type", "application/x-www-form-urlencoded", WIP_COPT_HTTP_HEADER, "Content-Length", 9, WIP_COPT_HTTP_HEADER, "Accept", "text/html", WIP_COPT_HTTP_HEADER, "Accept-Language", "fr, en", "value=123" //?? How to insert these values into HTTP POST WIP_COPT_END);
Thank you very much.