Request

public class Request : NSObject, Codable

Represents an HTTP request made by the player, such as a certificate request, license request, or discovery request.

  • url

    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

    url

    The URL of the server.

    method

    The method of the HTTP request.

    headers

    The HTTP headers to be sent to the server.

    body

    The body of the request.