![]() |
![]() ![]() ![]() |
WinHTTP component.
|
property AcceptTypes: String; // default is "*/*"
|
The AcceptTypes property specifies the array of media types (also known as Multipurpose Internet Mail Extension (MIME) type) which you would like to receive from the Web using the WinHTTP component (HTTP client). These strings indicates content types accepted by the client. If AcceptTypes is empty, no types are accepted by the client.
|
|
![]() |
|
Servers interpret a lack of accept types to indicate that the client accepts only documents of type "text/*" (that is, only text documents, and not pictures or other binary files.
|
|
To specify multiple MIME types, sepearate them by comma sign "," (ie: "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, */*").
|
|
![]() |
if ($ENV{'HTTP_ACCEPT'} =~ /wml/) {
|
print "Location: http://website.com/wap/index.wml\n\n";
|
}else {
|
print "Location: http://website.com/index.html\n\n";
|
When server founds "WML" word between the accepted types, it will redirect the client to certain WAP page. As you can see, sometimes the HTTP output depend on accepted media types.
|
|
For more details on Accept header please see the reference at http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1
|
![]() |
AddHeaders, Agent, URL and Referer properties.
|