I have an application on a server that requires authentication. Authentication is solved with the simple Cookie that’s returned in http header of the server response. I just can’t get to the point to reading http headers retured.
Have a look at the WIP_COPT_HTTP_HEADER option to the wip_getOpts() function as a starting point.
If you are doing authentication, WIP also provides some HTTP Authentication Helper functions (e.g. wip_HTTPAuthScheme()). Check out the WIP Open AT IP Connectivity Development Guide (Section 9.18 in Version 5.10) for some details.
Please let us know how you get on…
Thank you, it worked like a charm.
I had the 2.00 version of WIP_Open_AT_IP_Connectivity_Development_Guide, and it doesn’t contain wip_getOpts.
I actually had to go through a little trouble to find v5.10, but it works. Thank you, thank you, thank you.
Yes it does - it’s on page 77!
Glad that it worked for you.
Did you use WIP_getOpts() or the wip_HTTPAuthScheme() stuff?
I used both, on different applications.
The authScheme gave me no headache, as opposed to cookies
I used it like this before creating DATA channel:
http_ClientTestCtx.DataChannel = wip_getFileOpts(
http_ClientTestCtx.CnxChannel, // session channel
url, // requested URL
http_ClientTestDataHandler, // data handler
&http_ClientTestCtx, // context
// request headers
WIP_COPT_HTTP_HEADER, "Authorization", auth_header,
WIP_COPT_HTTP_HEADER, "Content-Type", "*/*",
WIP_COPT_HTTP_HEADER, "Accept", "text/plain",
WIP_COPT_HTTP_HEADER, "Accept-Language", "fr, en",
Glad to hear that you got it all going - and thanks for the example for the rest of us