IRequest

public protocol IRequest

Interface for a network request.

  • url

    The URL of the request.

    Declaration

    Swift

    var url: URL?
  • The HTTP method of the request.

    Seealso

    Alamofire.HTTPMethod

    Declaration

    Swift

    var type: HTTPMethod
  • The body JSON object for the request.

    Declaration

    Swift

    var body: [String: AnyObject]
  • The raw body data for the request.

    Declaration

    Swift

    var rawBody: Data?
  • The HTTP header fields for the request.

    Declaration

    Swift

    var headers: [String: String]
  • Sends the request.

    Declaration

    Swift

    func send() -> Promise<Response>

    Return Value

    A promise that will be resolved when the request is completed.