AdapterRequest

public protocol AdapterRequest

Requests that the Service sends to the HTTPAdapter. This is actually just wraps the Request struct, erasing the Path type so the adapter doesn’t have to deal with it.

  • URL

    The fully qualified URL for the request.

    Declaration

    Swift

    var URL: URL
  • The request headers.

    Declaration

    Swift

    var headers: [String: String]?
  • The query string. The adapter is expected to encode these and append them to the URL. They are provided as a Dictionary so that they can be manipulated or added to.

    Declaration

    Swift

    var query: [String: String]?
  • The body of the request. Generally only relevant for POST, PUT and PATCH requests, but the HTTP spec does allow a body for GET as well.

    Declaration

    Swift

    var body: String?