How to add parameters in request.content

I have created a reverse proxy and body parameters are

{"name":"xyz","Id":"123"}

but by modifying the payload in javascript policy

var payload = JSON.parse(context.getVariable("request.content"));
payload.key ="xyzkey";
context.setVariable("request.content",JSON.stringify(payload));

or by using assign message policy

<Set>
  <Payload contentType="application/json">{payload}<Payload/>
<Set>

by modifying the request.content

Request sent to target server
url become blank.
How to overcome the problem?
0 1 369
1 REPLY 1

Hi Dinesh,

the logic you describe won't have any effect on the target URL.

There is something else in your proxy causing the url to become "blank".

(I don't know what you mean by "url become blank" - does it mean the path is empty? the hostname is empty too? something else?)

But anyway, you're barking up the wrong tree. Look elsewhere in the proxy to find the cause of a blank URL. You showed only a fragment of the AssignMessage policy. It could be what you left out, is causing the url to be blank. Or it could be something else.