Redirects your request to the url
and returns its response to you.
The parse param {path}
from request.url will be overwritten in response.url
.
For convenience, you can specify all the request.method used.
The request to the proxy endpoint will use the request.method
.
Types | Default |
---|---|
string | require |
[
{
"request": {
"method": [
"GET",
"POST",
"PUT",
"DELETE",
"OPTIONS"
],
"url": "/proxy/{path:.+}"
},
"response": {
"type": "proxy",
"url": "https://api.site.com/{request.urlParams.path}"
}
}
]
Number of seconds to wait
Types | Default |
---|---|
float | 0.0 |
[
{
"response": {
"type": "proxy",
"delay": 0.2
}
}
]
Response HTTP headers
Types | Default |
---|---|
object | [] |
[
{
"request": {
"url": "/proxy/{path:.+}"
},
"response": {
"type": "proxy",
"url": "https://api.site.com/{request.urlParams.path}",
"headers": {
"Authorization": "Bearer JWT.token"
}
}
}
]
The content
will be passed to the proxy endpoint.
Types | Default |
---|---|
array|string|null | null |
[
{
"request": {
"url": "/proxy/{path:.+}"
},
"response": {
"type": "proxy",
"url": "https://api.site.com/content-wrapper",
"content": {
"account": {
"id": "{{faker.uuid}}"
}
}
}
}
]