Hi Friends,
I have Post Api with querystring parameters.When I am testing it in the postman getting data but while implimenting API with PostAsync method not getting data from the API.
I tried with different ways of sending parameters to POST API method such as Dictionary , list key value pair and string content but I am not unable to get the data from the API.
?username=user&password=pass&from=2022-02-03&to=2022-02-04
how to acheive this functionality?

Naimish MakwanaRank #324 · 7.7K reputationPosted Feb 7, 2023, 12:19 PM EST
Hello Prasanna,
You can use RestClient in C#. Try below code.
var client = new RestClient("https://api-url"); var request = new RestRequest("ActionName", Method.Post); request.AddParameter("username", "user"); request.AddParameter("password", "pass"); request.AddParameter("from", "2022-02-03"); request.AddParameter("to", "2022-02-04");Thanks
Naimish Makwana