Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi, all,

I want to authenticate users through an authenitcated URL. It should return a XML file. This URL can be called throught either a GET or a POST. The device client will use a POST. How do I do that? What kind of interface do I use, IWeb or ISocket interface? A code snippet will be great or which example should I look at.

Thank you.

You can use either IWEB/ISOCKET. IWeb is http API on top of ISocket interface. Netdiagnostics in BREW 2.0 or above SDK will give you the usage of IWeb API. For ISocket usage download older versions of SDK (e.g. BREW 1.1) which has ISocket example.
ruben

You can use either IWEB/ISOCKET. IWeb is http API on top of ISocket interface. Netdiagnostics in BREW 2.0 or above SDK will give you the usage of IWeb API. For ISocket usage download older versions of SDK (e.g. BREW 1.1) which has ISocket example.
ruben

Thanks, Ruben.
I looked at other postings that say focus on IWEB_GetResponse() and WebOpt_BODY. What do they do? Do they allow you to POST in the URL? Is there a field in there says what is expected to be returned, or a field that contains user information?
I just want to use a POST to access a URL and authenticate a user, and return a XML document back for parsing and rendering if successful.
Thanks.

Thanks, Ruben.
I looked at other postings that say focus on IWEB_GetResponse() and WebOpt_BODY. What do they do? Do they allow you to POST in the URL? Is there a field in there says what is expected to be returned, or a field that contains user information?
I just want to use a POST to access a URL and authenticate a user, and return a XML document back for parsing and rendering if successful.
Thanks.

WebOpt_BODY should contain your post data. If you want to use secure http, then pass https:// in your url for IWeb_GetResponse call. Your post data body should contain your application specific information.
I personally prefer IWeb_GetResponseV instead in IWeb_GetResponse. It is essentially the same, but makes my code look cleaner.
ruben

WebOpt_BODY should contain your post data. If you want to use secure http, then pass https:// in your url for IWeb_GetResponse call. Your post data body should contain your application specific information.
I personally prefer IWeb_GetResponseV instead in IWeb_GetResponse. It is essentially the same, but makes my code look cleaner.
ruben