RequestType

public protocol RequestType

Request type used by willSend plugin function.

  • Retrieve an NSURLRequest representation.

    Declaration

    Swift

    var request: URLRequest? { get }
  • Additional headers appended to the request when added to the session.

    Declaration

    Swift

    var sessionHeaders: [String : String] { get }
  • Authenticates the request with a username and password.

    Declaration

    Swift

    func authenticate(username: String, password: String, persistence: URLCredential.Persistence) -> Self
  • Authenticates the request with an NSURLCredential instance.

    Declaration

    Swift

    func authenticate(with credential: URLCredential) -> Self
  • cURL representation of the instance.

    Declaration

    Swift

    func cURLDescription(calling handler: @escaping (String) -> Void) -> Self

    Return Value

    The cURL equivalent of the instance.