How to send ETag header element in the http request.. | developer.brewmp.com How to send ETag header element in the http request.. | developer.brewmp.com

Developer

How to send ETag header element in the http request..

Forums:

I am Creating an weather forcast application and using IWeb to download the xml file which contains weather data. My question is that I am getting ETag in the header field first time when I send the request  but from next time I want to check if weather data has been updated at server side or not. So I want to send next request with the previous header element ETag and want to check it for any change in the data so that I can get the new data from the server? 

If my way of thinking is wrong...Anyone can suggest me other way to achieve this.

Thank you!

you may add headers (format- parm: value) as a WebOpt - "WEBOPT_HEADER", in the call to IWeb_GetResponse to add custom headers & their values to a request.
 
eg: the below requests adds 2 headers (Content-type & WWW-Authenticate)to the request.
 

IWEB_GetResponse(pIWeb,(pIWeb, &pIWebResp, Url,
WEBOPT_HANDLERDATA, pWeb,
 

WEBOPT_HEADER, "Content-type: application/atom+xml\r\n",
WEBOPT_HEADER, "WWW-Authenticate: Normal",
WEBOPT_HEADERHANDLER, headerHandler,
WEBOPT_END));

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

you may add headers (format- parm: value) as a WebOpt - "WEBOPT_HEADER", in the call to IWeb_GetResponse to add custom headers & their values to a request.
 
eg: the below requests adds 2 headers (Content-type & WWW-Authenticate)to the request.
 

IWEB_GetResponse(pIWeb,(pIWeb, &pIWebResp, Url,
WEBOPT_HANDLERDATA, pWeb,
 

WEBOPT_HEADER, "Content-type: application/atom+xml\r\n",
WEBOPT_HEADER, "WWW-Authenticate: Normal",
WEBOPT_HEADERHANDLER, headerHandler,
WEBOPT_END));