Request

public protocol Request

Abstract REST request protocol.

  • Undocumented

    Declaration

    Swift

    associatedtype ResponseType : Decodable
  • method Default implementation

    The HTTP Method of the request. Default: .get.

    Default Implementation

    Declaration

    Swift

    var method: HTTPMethod { get }
  • suffix Default implementation

    The url suffix of the request. Default: nil

    Default Implementation

    Declaration

    Swift

    var suffix: String? { get }
  • headers Default implementation

    Additional headers for the request. Default: nil.

    Default Implementation

    Declaration

    Swift

    var headers: RequestHeaders? { get }
  • parameters Default implementation

    The parameter dictionary of the request. Default: nil.

    Default Implementation

    Declaration

    Swift

    var parameters: RequestParameters? { get }
  • isDebugModeEnabled Default implementation

    If true, networking layer will print information about this request to the console. False by default.

    Default Implementation

    Declaration

    Swift

    var isDebugModeEnabled: Bool { get }
  • parameterEncoding Default implementation

    Parameter encoding for the request. Default: .url in case of .get, .head HTTPMethod, .json in case of .post, .put, .delete, .patch HTTPMethod

    Default Implementation

    Declaration

    Swift

    var parameterEncoding: ParameterEncoding { get }