RequestDelegate

public protocol RequestDelegate

Represents a RequestDelegate that is associated with Requestable.

  • prepare(_:requestable:) Default implementation

    Called to modify a request before sending.

    Default Implementation

    No-op

    Declaration

    Swift

    func prepare<R>(_ request: URLRequest, requestable: R) -> URLRequest where R : _Requestable
  • willSend(_:requestable:) Default implementation

    Called before the request is sent over the network.

    Default Implementation

    No-op

    No-op

    No-op

    Declaration

    Swift

    func willSend<R>(_ request: inout DataRequest, requestable: R) -> <<error type>> where R : Requestable
  • didSend(_:requestable:) Default implementation

    Called when the request is sent over the network.

    Default Implementation

    No-op

    Declaration

    Swift

    func didSend<R>(_ request: Request, requestable: R) -> <<error type>> where R : _Requestable
  • process(_:requestable:response:) Default implementation

    Called before the request calls its completion handler.

    Default Implementation

    No-op

    No-op

    No-op

    Declaration

    Swift

    func process<R>(_ request: Request, requestable: R, response: DataResponse<R.Response>) -> DataResponse<R.Response> where R : Requestable