Q: Why does Post action work in Postman, not in C# I am trying to execute a GET command so I get can get data from a server. The Curl below works in Postman.
$ curl -X GET -H "Authorization: {SESSION_ID}" \
https://{server}/api/{version}/metadata/vobjects

While running my code, I am able to get the session ID. The next step is to get the data. But when I execute the GET, I don't get any response. Instead a I get an error as follows: "Specified value has invalid HTTP Header characters. (Parameter 'name')"
Below is the C# code I am trying to execute
public static void getObjects(string sessionID)
        {
            var client = new RestClient("https://generic-server.com/api/v20.3/metadata/vobjects/");
            client.Timeout = -1;
            var request = new RestRequest(Method.GET);
            request.AddHeader("Authorization:", sessionID);
            IRestResponse response = client.Execute(request);
            Console.WriteLine("Here's the response: "  + response.Content + " " + response.Content.Length);
            Console.WriteLine("Here's the error message: " + response.ErrorMessage);
        }

Problem: I get no response from the server and the response length is zero.

Here's the response:  0

response.ErrorMessage gives the following:

Here's the error message: Specified value has invalid HTTP Header characters. (Parameter 'name')

Note: When I leave the colon out of of the header, then I get the following response from the server:

{"responseStatus":"FAILURE","errors":[{"type":"INVALID_DATA","message":"Invalid http header [Accept: application/json, text/json, text/x-json, text/javascript, application/xml, text/xml]"}]} 190


A: Have you tried ("Authorization", $"Bearer {sessionID"});
