For anyone reading this in future this was how I solved it using RestSharp.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello
I have an API that I need to POST to from within a C# application. I have the posts working correctly within Postman but
I cannot seem to get the corresponding code working in a Console application. The format of the authentication in Postman
is "API Key" with a key/value pair.
To be honest I am not sure how to map the authorization into C# code, so probably the attached example is wrong.
Does anyone have an example of how to add this key/value pair to the headers and/or have any comments on if I should be adding the
values or use the byte[] that I got from some working code that used "Basic" authentication
My code example is just from a sandpit test.
Thanks in advance.
For anyone reading this in future this was how I solved it using RestSharp.