Request
public class Request : NSObject, Codable
Represents an HTTP request made by the player, such as a certificate request, license request, or discovery request.
-
The URL of the server to which the request is sent.
Declaration
Swift
public var url: String -
The method of the HTTP request, for example: GET, POST or PUT.
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 request. Will be nil for GET requests.
Declaration
Swift
public var body: Data? -
Creates a new HTTP request.
Declaration
Swift
public init(url: String, method: String, headers: [String : String], body: Data?)Parameters
urlThe URL of the server.
methodThe method of the HTTP request.
headersThe HTTP headers to be sent to the server.
bodyThe body of the request.