-
Question about URLRequest
I'm a little lost with regard to two properties of this class:
contentType
requestHeaders
Is there any direct correlation between them?
As far as I know contentType is used to specify the MIME type of the data to be sent, whereas requestHeaders is an array which contains each header. So, what if I write something like this?:
PHP Code:
var headers:Array = new Array(new URLRequestHeader("Content-Type", "text/html")); myURLRequest.requestHeaders = headers; myURLRequest.contentType = "application/octet-stream"; // instead of "text/html"
wouldn't it be an incongruity?? I'm not very keen on HTTP headers so I'm not sure if both refer to the same thing or not.
Last edited by Jazztronik; 07-23-2009 at 02:13 PM.
-
Taken from the Flash Help:
contentType : String
The MIME content type of any POST data.
requestHeaders : Array
The array of HTTP request headers to be appended to the HTTP request.
-
Thanks for your reply, but if you had read all my previous post, you would have noticed that I already looked up the Flash help.
My question is whether there could be any equivalence between the value of contentType, and the header stored as an array element in requestHeaders whose value is pointing to the same content type, and what would happen if each one referred to different content types.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|