cancel
Showing results for 
Search instead for 
Did you mean: 

Not able to convert x-www-form-urlencoded (Postman) to WebApi

Rufus
Level 2
Hi, anyone who knows how to "convert" my Postman POST command to BP Web api format?

In Postman, the keys are in Body as x-www-form-urlencoded.

Converted to CURL (it looks like this):
curl --location --request POST 'https://xxxx' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=xxx' \
--data-urlencode 'scope=xxx' \
--data-urlencode 'username=xxx' \

In BP Web api \ Request\ Body content \ Template, I have tried both format 'key1=[value1]'&'key2=[value2]' and JSON format like { "key1": "[value1]", "key2": "[value2]"} (Content-Type= application/x-www-form-urlencoded and application/json).

Both elternatives return HTTP 400 error (which is syntax error, I quess).



------------------------------
Ruben Gjelsten
Senior Analyst Service Management
SSV IIC RPA
Europe/London
------------------------------
30 REPLIES 30

Vijay.A
Verified Partner

This is fixed, the issue was username & password had '@' value which was causing issue...Used postman to get the username & password from CURL to http.

body content used:

"username=vijay.a.thiagarajan13%mamsmdm.com&password=12ndfanfs26%nfsfn"