|
RestLink 2.2.0
Powerfull Rest Client for Qt
|
Interface for intercepting and modifying HTTP requests and their bodies before dispatch. More...
#include <abstractrequestinterceptor.h>
Inherited by RestLink::LogRequestInterceptor.
Public Member Functions | |
| virtual | ~AbstractRequestInterceptor ()=default |
| virtual void | intercept (AbstractRequestHandler::Method method, Request &request, Body &body)=0 |
| Called before a request is sent, allowing modification of both request and body. | |
Interface for intercepting and modifying HTTP requests and their bodies before dispatch.
Implement this class to apply custom logic to HTTP requests before they are sent. Typical use cases include injecting authentication tokens, customizing headers, modifying the request URL, or altering the request body.
This is useful for logging, request signing, transforming payloads, or enforcing global rules. The interceptor is called just before the request is dispatched.
|
virtualdefault |
|
pure virtual |
Called before a request is sent, allowing modification of both request and body.
Use this method to alter the HTTP method, headers, URL, or the body content prior to transmission.
| method | The HTTP method (GET, POST, PUT, etc.). |
| request | The request object to be modified. |
| body | The body associated with the request, which can also be modified. |
Implemented in RestLink::LogRequestInterceptor.