HTTPRequest

public struct HTTPRequest

An HTTPRequest encapsulates the details of an HTTP request over the HTTP service.

  • url

    The URL that the request will be performed against.

    Declaration

    Swift

    public let url: String
  • The HTTP method of the request.

    Declaration

    Swift

    public let method: HTTPMethod
  • The URL that will be used to capture cookies for authentication before the actual request is executed.

    Declaration

    Swift

    public let authURL: String?
  • The headers that will be included in the request.

    Declaration

    Swift

    public let headers: [String : [String]]?
  • The cookies that will be included in the request.

    Declaration

    Swift

    public let cookies: [String : String]?
  • The body that will be included in the request.

    Declaration

    Swift

    public let body: Data?
  • Whether or not the included body should be encoded as extended JSON when sent to the url in this request.

    Declaration

    Swift

    public let encodeBodyAsJSON: Bool?
  • The form that will be included in the request.

    Declaration

    Swift

    public let form: [String : String]?
  • Whether or not Stitch should follow redirects while executing the request. Defaults to false.

    Declaration

    Swift

    public let followRedirects: Bool?