HTTP POST format with different datatypes

Hi All,

I’m trying to do a HTTP Post. In that request I need to post different datatypes
image

I have to pass Datetime, integers and Booleans , I’m trying to pass it in BOdy as below
image

by assigning Json as string

But I’m getting errors as can’t convert from string to datetime conversion problems.

Can you please suggest the correct format to pass in HTTP Post Body.

Thanks,

Hi,

Is your dairydate variable DateTime type? If so,can you try to use the following instead of dairydate?

Newtonsoft.Json.JsonConvert.SerializeObject(diarydate)

Regards,

http post will accept only json string

Hi ,

I’m using JSON string only in the mentioned above format, even if I convert everything to string and POST also no result. It’s giving 500 internal error.

@Palaniyappan : Hi can you please help me on this?

Hey,
have you tested your HTTP request for example in Postman? There you will be able to verify that the body of your request is correct. UiPath isn’t good tool to verify HTTP requests and responses.