Get desired result while calling API using Postman but don't when using RestShart in console program

S.ATTA.M

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:

enter image description here

2: Copied code from Postman in C# console program:

enter image description here

3: Date format error while calling from console program enter image description here

Your expert opinion will be highly appreciated.

S.ATTA.M

Finally i got the solution here, thanks to @alexeyzimarev

enter image description here

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

I Don't get the expected result when calling ocr api from computer visio

Can't get desired result on Java program

when I try to convert Boost Time_duration to string by using a sstream and facet i don't get the desired format

Unable to get the desired result or output while using if-else statement inside a For loop of a batch script

I don't get the result of my promise despite using await

Don't autostart program when using remote desktop

How to get expected and actual result on console when a test fails in Postman

Don't get result when I try to read console output error in java

I don't get bluetooth gatt services discovered when using android api 23 and more

Can't get desired output while looping using VB.Net and SQL server

When I post a JSON while using Mercado Libre's API all accented letters are removed and I don't think this is the default behavior

Not getting desired result when using synchronized keyword in Java multithreading

calling an api inside map function and using the result

Iterating through list and using remove() doesn't produce desired result

Don't get OpenGL output when using glVertexAttribFormat

Angular Observable don't set local variable while calling API

Cannot GET /api/signup - Using Postman and mongodb

How to get JSON result in grid/tabular format while calling an API?

I don't understand why my api is returning unknown/undefined when I call it using app.get

When using DB-API substitution for the column name in select query I don't get the expected value but column name instead

After custom function, calling the object in R console produces desired result whilst "View" the object from environment doesn't

Unable to see the request body in the console when using Postman

Using variables in query don't get result. Real values do. Why?

API calling from Postman is working, but API calling from another service using Retrofit is not working

Cannot write in a file when using starting a program using the console

Could not get desired output when using state varible in JSON

Can't get result of desired query in linq

Using postman to get OAuth2 token using Google API

Why I can't get desired output in animation using CSS?