Type Method

setProperty(_:forKey:in:)

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

Declaration

class func setProperty(_ value: Any, forKey key: String, in request: NSMutableURLRequest)

Parameters

value

The value to set for the specified property.

key

The key for the specified property.

request

The request for which to create the property.

Discussion

Use this method to provide an interface for protocol implementors to customize protocol-specific information associated with URLRequest objects.

See Also

Getting and Setting Request Properties

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

Fetches 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.