I have a rest web-service which accepts JSON post data but for requesting any API url, we need to pass access_token
.
So my post data is a JSON data and access_token
is passed as query string.
Problem:
As per my exploration i have not found any way to send request which can have JSON post data and also accepts Query String from the HTTP-URL-REWRITING in JMeter.
Actual Request:
POST http://<domain>/webapp/service/document/save POST data: { node = '1'}token_XXXXXX [no cookies] Request Headers: Connection: keep-alive Content-Type: application/x-www-form-urlencoded Content-Length: 980 Host: localhost User-Agent: Apache-HttpClient/4.2.3 (java 1.5)
Below is the expected request data.
Expected Request:
POST http://<domain>/webapp/service/document/save?access_token=token_XXXXXX POST data: { node = '1'} [no cookies] Request Headers: Connection: keep-alive Content-Type: application/x-www-form-urlencoded Content-Length: 980 Host: localhost User-Agent: Apache-HttpClient/4.2.3 (java 1.5)
How should i configure it in JMeter?