Http POST request body error

Hi,

I’m trying to make a connection in an api using the post method, where the request body must be the same as below

{
“numero”: “0000000000”
}.

I’m using the C# language in the project, and when I try to put the json in the “body” field, it presents several errors depending on how I describe the json string.

Here is the last error displayed

I would like to know how I can declare the json in string format so that the body can be recognized correctly by the request. I tried some alternatives in forum searches but i just got different errors, in return from api reporting data error or as syntax error in UiPath.

Thanks!

sorry, this

Hi @andre.nascimento

Assign

jsonString = "{""numero"": ""0000000000""}"

and don’t miss out on any quotes or curly braces here. Now pass the jsonString to the body & check if it works. Please let us know regarding the same.

Hope this helps,
Best Regards.

hi!

i got these errors

Insomnia test still works:

Hi @andre.nascimento

Please refer to the quotes u have to use in the body request variable for HTTP Request:

output

image

thanks
priya

i fix it loading .txt file with json.

Thanks

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.