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 RestMiddleware, you can derive from the RestMiddleware and create you own request logger.
- Inheritance
-
- Object
- RestMiddleware<
RestRowRequest> - RequestLogger
Constructors
-
RequestLogger.new({Set<
LogParts> logParts = LogParts.all})
Properties
Methods
-
addNext(
RestMiddleware< RestRowRequest> 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 and RestClientBuilder.addResponseMiddleware
inherited
-
next(
RestRowRequest row) → Future< RestRowRequest> -
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(
RestRowRequest row, RestMiddleware< RestRowRequest> nextMiddleware) → Future<RestRowRequest> -
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