The http_get_content_type
function returns a pointer to the Content-Type html header,
which was received in the xml or any other type post. You can use
this function to check for the content type, which was submitted by
the Silverlight web service application.
The http_get_content_type function is a system function
that is in the RL-TCPnet library. The prototype is defined in
net_config.h.
note
When a Silverlight web service application sends a request to a
web server, it specifies the Content-Type in the HTTP header
that is sent to the web server. This information is processed by
TCPnet and stored internally.
Return Value
The http_get_content_type
function returns a pointer to the content type header, which is a
null-terminated string.
void cgi_process_data (U8 code, U8 *dat, U16 len) {
U8 *pType;
switch (code) {
case 4:
/* Other content type data, last packet. */
pType = http_get_content_type ();
if (strcmp (pType,"text/xml; charset=utf-8") == 0) {
/* XML encoded, 'utf-8' character set */
..
}
return;
case 5:
/* Other content type data, more to follow. */
return;
default:
/* Ignore all other codes. */
return;
}
}
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.