How to consume HTTP POST REST API which accepting body form-data with key value pair.

I want to consume HTTP POST REST API which accepting body form-data with key value pair. I have tried with adding content-type as multipart/form-data and request body with json but it didn't working. Please help me..

Hi Deepali,

As per the shared API response in the image file, it is clearly mentioned that the API is working fine 200 OK but the passed user credential i.e. Username and Password as Request during the API call on the basis of which your are trying to access/fetch the value is not valid, please check the passed user credential details. 

Hope this helps!


Regards,

Benjith Sam

Benjith Sam wrote:

Hi Deepali,

As per the shared API response in the image file, it is clearly mentioned that the API is working fine 200 OK but the passed user credential during the API call on the basis of which your are trying to access/fetch the value is not valid, please check the passed user credential details. 

Hope this helps!


Regards,

Benjith Sam

The user credential is correct, because I am able to get the API response in Postman with same credential and body type form-data. Refer SS below: