RequestLogger class
The RequestLogger is a default logger implementation for the requests. Here is how the logged request's structure looks like.
→ REQUEST →
Here is how real logged PUT request looks like in the console.
→ REQUEST → PUT: https://example.com/api/v1/user/324234 HEADERS: Content-Type : application/json Authorization : eyJhbGciOi.... Language : EN Version : 1.1.76
BODY: {"firstName":"Joe"}
The RequestLogger is a descendant of Middleware, you can derive from the Middleware and create you own request logger.
- Inheritance
-
- Object
- Middleware<
RowRequest> - RequestLogger
Constructors
-
RequestLogger({Set<
LogParts> logParts = LogParts.all})
Properties
Methods
-
addNext(
Middleware< RowRequest> middleWare) → void -
This method adds a middleware to the chain.
This method is called by the Rest library, no need to call it manually,
instead use
RestClientBuilder.addRequestMiddleware
andRestClientBuilder.addResponseMiddleware
inherited -
next(
RowRequest row) → Future< RowRequest> -
This method will call next middleware in the chain. Initially this method get
called by the
RestClient
.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onNext(
RowRequest row, Middleware< RowRequest> nextMiddleware) → Future<RowRequest> -
Override this method and implement your custom logic inside it.
After call await nextMiddleware.next(row) to run the next middleware in
the chain.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited