We are working on a project where our C# appliction is using 3rd party API (and we can't ask 3rd party for any changes). We are facing very strange behaviour that there is one end-point which requires few headers including 'date', when we call it through Postman it works fine and gives desired result but when we call it from a console program using RestSharp code (copied from Postman), the API returns with date format error showing the date in different format than what we send in the request. Please find below snapshots for further explaination:
1: Successful call from Postman:
2: Copied code from Postman in C# console program:
3: Date format error while calling from console program
Your expert opinion will be highly appreciated.
CodePudding user response: