Hi
I use Postman for testing and pass all the headers what i need.
My Policy is encapsulated assertions :
** Test Case 1
Set Conext Variable req.new as Message to: ${request}
Set Context Variable req.new.mainpart as String to: ${decoded.payload}
[Route via HTTP(s)]
- default configuration except two things below
- HTTP Method : ${request.http.method}
==> Setting context variable as Request Source always overwrite this to POST, so I should set like this
- Request Source : req.new (as Message)
==> case1) req.new Context variable copied with ${request} and then replace ${req.new.mainpart} with new conents > didn't work (backed api didn't recieved replaced content , and not all headers)
** Test Case 2
Set Conext Variable req.new as Message to: ${decoded.payload}
[Route via HTTP(s)]
- default configuration except two things below
- HTTP Method : ${request.http.method}
- Request Source : req.new (as Message)
==> case 2) req.new Context variable as Message with new String > backend api recieved new content but not all headers
The Backend recieved the headers
[when Default Request Source]
accept:application/json, accept-encoding:gzip, deflate, apikey:l7xx243e7b1751454f0d9f4a4b3fb9c36259, connection:Keep-Alive, content-length:188, content-type:application/json, host:localhost:8080, user-agent:PostmanRuntime/6.1.6, x-bc-txid:D0000015d2f81fa21-f00
[when Using Context Variable Request Source]
connection:Keep-Alive, content-length:188, content-type:application/json; charset=utf-8, host:localhost:8080, user-agent:Apache-HttpClient/4.2.5 (java 1.5)
I can't understand the Message type variable's behavier as Request Source in Route Assertion. and the headers problem.
I need guide to fix this.