0

I am wondering if anyone knows how to do make a Get request with Oauth2 and display it on the console? Here is my code so far:

    static void Main(string[] args)
    {
        string url = "https://api.test";

        var client = new RestClient(url);

        var request = new RestRequest();

        request.AddHeader("Client-Id", "placeholder");
        request.AddHeader("Bearer", "placeholder");

        var response = client.GetAsync(request);

        Console.WriteLine(response);

        Console.Read();
    }
nsempf
  • 1

0 Answers0