EXTENSION
URLRequest
public extension URLRequest
Properties
masked
public var masked: String
Methods
addAuthorizationHeader(headerValue:)
mutating func addAuthorizationHeader(headerValue: String)
Add an Authorization HTTP request header to the URLRequest instance
- Parameter headerValue: value to set for the 
Authorizationheader 
Parameters
| Name | Description | 
|---|---|
| headerValue | value to set for the Authorization header | 
addDpopHeader(headerValue:)
mutating func addDpopHeader(headerValue: String)
Add a DPoP HTTP request header to the URLRequest instance
- Parameter headerValue: value to set for the 
DPoPheader 
Parameters
| Name | Description | 
|---|---|
| headerValue | value to set for the DPoP header | 
addDpopAccessTokenHeaders(from:httpMethod:url:)
mutating func addDpopAccessTokenHeaders(from dpopAccessTokenInfo: DpopAccessTokenInfo,
                                        httpMethod: String,
                                        url: URL) throws
Add both a Authorization as well as a DPoP HTTP request header to the URLRequest instance. The value to use for the DPoP HTTP request header is calculated for the provided httpMethod and url.
- 
Parameter dpopAccessTokenInfo: a
DpopAccessTokenInfoinstance that contains the AccessToken value to set asAuthorizationheader value - 
Parameter httpMethod: the HTTP method to calculate the DPoP proof token value for
 - 
Parameter url: the URL to calculate the DPoP proof token value for
 - 
Throws:
CryptoErrorexception when theDPoPproof token could not be generated due to a cryptograhic error 
Parameters
| Name | Description | 
|---|---|
| dpopAccessTokenInfo | a DpopAccessTokenInfo instance that contains the AccessToken value to set as Authorization header value | 
| httpMethod | the HTTP method to calculate the DPoP proof token value for | 
| url | the URL to calculate the DPoP proof token value for | 
addHaapiMediaTypeAcceptHeader()
mutating func addHaapiMediaTypeAcceptHeader()
Add the HTTP content type request header with the HAAPI content type to the URLRequest instance
addHaapiSessionIdHeader(_:)
mutating func addHaapiSessionIdHeader(_ sessionId: String)
Add a HAAPI Session-Id HTTP request header to the URLRequest instance
- Parameter headerValue: value to set for the 
Session-Idheader 
Parameters
| Name | Description | 
|---|---|
| headerValue | value to set for the Session-Id header |