How to create a Post request , Pass data in body

Hello Friends

I am working on web API, creating a post request

I want to send data in the Body of the post request for the same I have created a text file that contained the data

  • I read the data from the text file name finaltextfile.txt

  • Read text file, and pass that variable in the body ,but its not working

I think I am missing something could you please help me with that

Hey @JSR_Techno_Talk_s

Please mention Body Format as application/json

Thanks
#nK

HI @JSR_Techno_Talk_s

You will need to stringify your JSON data so that you can pass the JSON in body as a string something like below so that you can pass this string the BODY as a string.

"{“clientKey” :"ed234444444444"“task”:{“type:“ImageToTextTask”,“body”:“rjIUIGWEaX2gk43lJK8dMLPJFijro305mdfopdOP=”}”

To easily do this you can use JSON Stringify Online using JSON.Stringify() to convert your JSON to String

Hope this helps.

Thanks it solved now