The
rq.request object provides access to all details of the API request in your Requestly scripts. You can use these properties and methods in both pre-request and post-response scripts to read and manipulate request data.
Properties and Methods
rq.request.method
Use this property to get the Request’s method. The HTTP method of the request (e.g. GET, POST, PUT, OPTION, DELETE, PATCH, HEAD).
Example:
rq.request.headers
An list of header rows each having key, value & isEnabled for each custom header you create.
Example:
rq.request.body
The body of the request, accessible as a string. If you have selected Form under Body it would be returned in object format.
Example:
rq.request.url
The full URL of the API request.
Example:
rq.request.queryParams
An object containing rows of query parameters each having key, value & isEnabled.
Example:

