Search code examples
c#restsharppostmanjira-rest-api

PostMan GET works, but RestSharp returns empty JSON result


Im trying to figure out why my PostMan GET works fine, but when i do the same command through Visual Studio, i get an empty JSON.

RestSharp GET

    [HttpGet]
    public IEnumerable<string> Get()
    {         

        var client = new RestClient("http://ignitemedia.atlassian.net/rest/api/2/");
        var request = new RestRequest("project/", Method.GET);

        IRestResponse response = client.Execute(request);
        var content = response.Content; // raw content as string

        return null;
    }

POSTMan GET

http://ignitemedia.atlassian.net/rest/api/2/project
no Headers

Solution

  • The only thing it was missing was an "s" in "https".