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
response
The response to log.
request
The 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
error
The error to log.
request
The request that recieved the error.