HTTP and HTTPS URL Property Name Constants

Identify property values specific to HTTP and HTTPS URLs.

#define kURLHTTPRequestMethod "URLHTTPRequestMethod"; 						
#define kURLHTTPRequestHeader "URLHTTPRequestHeader";
#define kURLHTTPRequestBody "URLHTTPRequestBody";
#define kURLHTTPRespHeader "URLHTTPRespHeader";
#define kURLHTTPUserAgent "URLHTTPUserAgent";
#define kURLHTTPRedirectedURL "URLHTTPRedirectedURL"
Constant descriptions
kURLHTTPRequestMethod
Identifies the HTTP request method property value. You use this name constant to set or obtain a C string that represents the HTTP method to be used in the request. If you are posting a form, you must set this property to the string "POST".
kURLHTTPRequestHeader
Identifies the HTTP request header property value. You use this name constant to set or obtain a C string that represents the HTTP header to be used in the request. You may set this property to contain all headers needed for the request. If you are posting a form and have set the properties identified by the name constants kURLHTTPRequestMethod and kURLHTTPRequestBody , you do not need to set the property identified by this tag.
kURLHTTPRequestBody
Identifies the HTTP request body property value. You use this name constant to set or obtain a buffer of data that represents the HTTP body to be provided in the request. If you set the property identified by this tag but not that identified by the name constant kURLHTTPHeader , a body-length header is automatically added to the request. If you are posting a form, you must set this property to the form data you want sent.
kURLHTTPRespHeader
Identifies the HTTP response header property value. You use this name constant to obtain a C string that represents the HTTP response header that was received.
kURLHTTPUserAgent
Identifies the user agent property value. You use this name constant to set or obtain a C string that represents the HTTP user agent string that is embedded in HTTP requests. By default, the URL Access Manager sets the user agent string to "URL Access 1.0 (Macintosh; PPC)".
kURLHTTPRedirectedURL
Identifies the redirected URL property value. You use this name constant to obtain a C string that represents the URL that you were redirected to.
Discussion

These constants represent Apple-defined name constants that identify property values specific to HTTP and HTTPS URLs. For a description of the name constants that identify property values universal to all URLs, see Universal URL Property Name Constants.

You pass one of these name constants in the property parameter of the functions URLSetProperty and URLGetProperty, respectively, to set or obtain a particular property value. Note that you can only set HTTP and HTTPS property values identified by the constants kURLHTTPRequestMethod , kURLHTTPRequestHeader , kURLHTTPRequestBody , and kURLHTTPUserAgent . You must also pass the correct data type corresponding to the property value in the propertyBuffer parameter of these functions.

Version Notes

Prior to version 2.0.3 of the URL Access Manager, the data type of the property value identified by the name constant kURLHTTPRequestBody was a C string. In 2.0.3 and later, the data type is a buffer of data.


© 2000 Apple Computer, Inc. (Last Updated July 13, 2001)