How to Hit the API by using RAW DATA

Hi All,

While hitting API it is throwing below error when putting the parameters as Param:-


Same type of error in Postman too
{
“responseCode” : “01”,
“request_number” : null,
“responseText” : “Failure”
“result” : “request_number Json tag missing in request, bank_name Json tag missing in request”
}

But the same parameters if I do in Postman via inserting Raw Data then it is giving successful output
{
“responseCode” : “00”,
“request_number” : 1005,
“responseText” : “Success”
“result” : “Successfully Updated”
}

Raw Data:-
{
“request_number”:1005,
“bank_name”: “YES BANK”
}

So here my question is how can we hit the API using RAW data?

Please help me in this scenario

@pratik.wavhal.2223
welcome to the forum

pass the raw data JSON as a payload within the body

Hi @ppr ,

Thanks for the prompt response

Can you please share an example for this scenario, it will be great help for me.

grafik

Hi @ppr
Below is the screenshot for the implementation

What can be the issue now?

from your screenshot we cannot derrive

  • content of the text file
  • how the http request is configured and using it

Same Error I am getting in the output:-

Data in JSON BODy:-

Same Raw Data working in POSTMAN:-

would assume that a JSON object will be sent and { "… } is needed instead of {{ "… }}

Hi @ppr ,


After removing double brackets, it start working.

TYSM @ppr for your prompt help.

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