I'm trying to make an API call to third party URL, which is working fine through postman, but same request through C# HttpClient not working.
This is how I'm sending request in postman
C# Sample Code
var nvc = new List<KeyValuePair<string, string>>();
nvc.Add(new KeyValuePair<string, string>("PARAM1", "PARAM1 Value"));
nvc.Add(new KeyValuePair<string, string>("PARAM2", "PARAM2 Value"));
nvc.Add(new KeyValuePair<string, string>("PARAM3", "PARAM3 Value"));
var req = new HttpRequestMessage(HttpMethod.Post, "Https://ThirdPartyURL") {
Content = new FormUrlEncodedContent(nvc)
};
Am I doing anything wrong here?
UPDATE #1: **
Fiddler Traces for postman request(which is working fine)
Thanks in advance!
Regards, Moksh