RequestResponseLoggingInterceptor
open class RequestResponseLoggingInterceptor : RestingInterceptor
An interceptor that logs requests and responses, including errors if present.
-
Creates a new
RequestResponseLoggingInterceptor.Declaration
Swift
public init() -
Declaration
Swift
open func intercept(request: HTTPRequest, execution: Execution) -> ProgressablePromise<HTTPDataResponse> -
Logs an
HTTPRequest.Declaration
Swift
open func log(request: HTTPRequest) -
Logs the response to a request.
Declaration
Swift
open func log(response: HTTPDataResponse, to request: HTTPRequest)Parameters
responseThe response to log.
requestThe request sent for the response.
-
Logs an error that occurred while sending a request.
Declaration
Swift
open func log(error: Error, to request: HTTPRequest)Parameters
errorThe error to log.
requestThe request that recieved the error.
RequestResponseLoggingInterceptor Class Reference