StaticRequestFilter — create new request within exchange object
Creates a new request within the exchange object. It replaces any
request that may already be present in the exchange. The request can include
a form, specified in the form parameter, which is included
in an entity encoded in application/x-www-form-urlencoded
format if request method is POST, or otherwise as
(additional) query parameters in the URI.
{
"name": string,
"type": "StaticRequestFilter",
"config": {
"method": string,
"uri": string,
"version": string,
"headers": {
name: [ expression, ... ], ...
},
"form": {
field: [ expression, ... ], ...
}
}
}"method": string, requiredThe HTTP method to be performed on the resource (for example,
"GET").
"uri": string, requiredThe fully-qualified URI of the resource to access (for example,
"http://www.example.com/resource.txt").
"version": string, optionalProtocol version. Default: "HTTP/1.1".
"headers": array of objects,
requiredHeader fields to set in the request. The name
specifies the header name, with an associated array of expressions to
evaluate as values.
"form": array of objects,
requiredA form to include in the request. The field
specifies the field name, with an associated array of expressions to
evaluate as values.
{
"name": "LoginRequestFilter",
"type": "StaticRequestFilter",
"config": {
"method": "POST",
"uri": "http://10.10.0.2:8080/wp-login.php",
"form": {
"log": [ "george" ],
"pwd": [ "bosco" ],
"rememberme": [ "forever" ],
"redirect_to": [ "http://portal.example.com:8080/wp-admin/" ],
"testcookie": [ "1" ]
}
}
}