C# and REST API: 401 error when setting "application/schema+json" header
I have been working on a light wrapper for the REST API in C# and have run into a really bizarre error that I only get in C#.
Whenever I set the "Accept" header to "application/schema+json", it will work as expected if I use the base REST API URL:
https://<interfacename>.custhelp.com/services/rest/connect/v1.3/ // Works as expected
However, if I change the URL to include a resource, it will return a 401 error
https://<interfacename>.custhelp.com/services/rest/connect/v1.3/incidents // returns a 401 error
From what I understand, in C#, you can only modify the accept header either with the HttpWebRequest or HttpClient classes.