Carbon


URLSetProperty

Header: URLAccess.h Carbon status: Supported

Sets the value of a URL property.

OSStatus URLSetProperty (
    URLReference urlRef, 
    const char *property, 
    void *propertyBuffer, 
    Size bufferSize
);
Parameter descriptions
urlRef

A reference to the URL whose property value you want to set.

property

A pointer to a C string representing the name of the property value you want to set. You can only set property values identified by the constants kURLPassword, kURLUserName, kURLHTTPRequestMethod, kURLHTTPRequestHeader, kURLHTTPRequestBody, and kURLHTTPUserAgent. For a description of these property name constants and their corresponding data types, see “Universal URL Property Name Constants” and “HTTP and HTTPS URL Property Name Constants”.

propertyBuffer

A pointer to a buffer containing the data you would like the property to be set to. The data must be of the correct type.

bufferSize

The size (in bytes) of the data you want to set.

function result

A result code. The result code kURLUnsettablePropertyError indicates that a property value cannot be set.

DISCUSSION

The URLSetProperty function enables you to set those property values identified by the following constants: kURLPassword, kURLUserName, kURLPassword, kURLHTTPRequestMethod, kURLHTTPRequestHeader, kURLHTTPRequestBody, and kURLHTTPUserAgent. For a description of these property name constants and their corresponding data types, see “Universal URL Property Name Constants” and “HTTP and HTTPS URL Property Name Constants”.

You may wish to call URLSetProperty before calling the function URLDownload or URLUpload to set a URL property before a data transfer operation.

AVAILABILITY

Supported in Carbon. Available in Carbon 1.0.2 and later when running Mac OS 8.1 or later.


© 2000 Apple Computer, Inc. (Last Updated 7/17/2000)