I am trying to consume REST API from my .NET Application. This API’s are all written in JAVA.
I am asked to pass the authentication credentials via HTTP headers. How can I pass these authentication credentials like ‘DATE’, ‘AUTHORIZATION’ and ‘Accept’ via HTTP headers.
Which class in .NET can I use to accomplish this task. Can anyone help me with this?
Update
This library has now been replaced by http://nuget.org/packages/Microsoft.Net.Http/2.1.10
Use the Microsoft.Http client library that is in WCF REST Starter Kit Preview 2.
Here is how you could use it: