JSON Body with using HTTP Request / Put in UiPath

I have sent JSON Body with using HTTP Request / Put in UiPath and received an error “HTTP 400 error invalid request”. This service is working properly using SoapUI. Sent body data as follows: { “AccID”: “534820”, “"AccTy”:“{ “NewAccTy”: “345”, “SubAccTy”: “374”, } }

Hi

Make sure the body format is mention as application/Json in that activity property panel

And also check whether URL Is correct
Body
Header if any

It must be missing somewhere with the property of that activity only if it’s works fine with soap UI

Cheers @akash_patel

{ “AccID”: “534820”, “"AccTy”:“{ “NewAccTy”: “345”, “SubAccTy”: “374”, } } is this correct ?

@akash_patel

Hello Akash,
if you use VB syntax this string should work:

"{""AccID"":""534820"",""AccTy"":{""NewAccTy"":""345"",""SubAccTy"":""374""}}"

Best regards
Stefan

4 Likes

Hi @akash_patel ,

You can write your JSON payload in a word file in a Simple JSON format and read the file and pass it in the activity also this way you can ignore putting extra inverted commas.

Thanks

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