Request
public class Request : NSObject, Codable
A request, either for a CertificateRequest or a LicenseRequest.
-
The URL for the certificate server. By default, this will equal the certificate URL configured in the
KeySystemConfiguration`.Declaration
Swift
public var url: String -
The method of the HTTP request, for example: GET, POST or PUT.
Remark
- Will be equal to GET for Fairplay certificate requests and POST for Widevine certificate requests.
- Will be equal to POST for all license requests.
Declaration
Swift
public var method: String -
The HTTP request headers to be sent to the server.
Declaration
Swift
public var headers: [String : String] -
The body of the certificate request.
Remark
- For GET requests (such as with Fairplay), the body will be empty (nil).
- For POST requests (such as with Widevine): the body will contain the two bytes in an array as specified in the certificate request protocol.
Declaration
Swift
public var body: Data? -
Creates a new HTTP request for the given URL.
Declaration
Swift
public init(url: String, method: String, headers: [String : String], body: Data?)Parameters
urlThe URL of the license or certificate server.
methodThe method of the HTTP request.
headersThe HTTP headers to be sent to the server.
bodyThe body of the request.