2

I am calling API as per image below ,somehow logic app add forward slash for each object in body when sending POST request.

Any idea how to fix this

{ "uri": https://test.com/apicall, "method": "POST", "headers": { "Content-Type":"application/x-www-form-urlencoded", "Cookie": "83B88D348F25", "whitespace": "no" }, "body": "request=&{\"action\":\"AddProduct\",\"ProductDetails\":{\"Prodct_Type\":"",\"Prouct\":\"apple\"}}" }

**Body should be when sending request from logic app ** "body": "request=&{"action":"AddProduct","ProductDetails":{"Prodct_Type":"","Prouct":"apple"}}"

API Call Screenshot

Skin
  • 9,085
  • 2
  • 13
  • 29
quantum07
  • 33
  • 3

1 Answers1

0

You could do something simple like using an expression to replace it:

replace(string(body('Get_blob_content')), '\', '')

How to: enter image description here

described on this post: How to remove or prevent escape slashes from json-file data in azure logic app workflow

but do you need to pass the whole json as a parameter? You can use the parse json action and this will let you pass the values as parameters: https://learn.microsoft.com/en-us/azure/logic-apps/logic-apps-perform-data-operations#parse-json-action