REST API - Visual Studio

I am able to call your REST API with no issues in POSTMAN, but when calling it from Visual Studio (via an internal test ASP.Net website) I get a nullreferenceexception every time.

Can you tell me why and how I can remedy this?