The http_get_content_type
function returns a pointer to the Content-Type html header,
which was received in the xml post request. 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:
/* XML encoded content type, last packet. */
pType = http_get_content_type ();
if (strcmp (pType,"text/xml; charset=utf-8") == 0) {
/* 'utf-8' character set */
..
}
else {
/* Not 'utf-8' */
..
}
return;
case 5:
/* XML encoded as under 4, but with more to follow. */
return;
default:
/* Ignore all other codes. */
return;
}
}
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.