Request Rewrite plugins allow you to intercept and modify every request sent to your API from the Mayhem for API CLI. These plugins allow you to apply custom authentication, request signing and other modifications to every request that are not available out of the box.
This example implements the rewrite plugin service that changes the content-type from application/json to application/grpc-web-text, and base64 encodes the body.
This example implements a service that adds an Authorization header to every request.
This example implements the same service as python-auth-plugin but written in Java.
A plugin that injects an authorization header retreived from an
OAuth OpenID Connect access token endpoint, implemented in Rust.
This example implements the rewrite plugin adding an Authorization header to every request.
This example shows how to use typescript as a plugin.
Response Classify plugins allow you to classify responses received from the server with customer headers, status codes, or other data.
This example implements the classify plugin by parsing the body for grpc-statuses and using them to create HTTP responses.