Type Method

property(forKey:in:)

Fetches the property associated with the specified key in the specified request.

Declaration

class func property(forKey key: String, in request: URLRequest) -> Any?

Parameters

key

The key of the desired property.

request

The request whose properties are to be queried.

Return Value

The property associated with key, or nil if no property has been stored for key.

Discussion

Use this method to access protocol-specific information associated with URLRequest objects.

See Also

Getting and Setting Request Properties

class func setProperty(Any, forKey: String, in: NSMutableURLRequest)

Sets the property associated with the specified key in the specified request.

class func removeProperty(forKey: String, in: NSMutableURLRequest)

Removes the property associated with the specified key in the specified request.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software