Skip to content

RestSharp not working #15976

@TFTomSun

Description

@TFTomSun

I tried to use restsharp for a simple rest request against the soundcloud rest api.

When I add the following code:

            WebRequest.DefaultWebProxy = null;
            var client = new RestClient("https://api.soundcloud.com/");
            var request = new RestRequest("tracks/13158665");
            request.AddQueryParameter("client_id", "****");

            var response = await client.ExecuteTaskAsync<string>(request);
            this.Response =  $"{response.StatusCode} {response.ErrorMessage} {response.Content}";

i get as response:

0 libc

when I execute inside a .net core test project i get:

Unauthorized

With a valid client id i get a full json response containing the track information in the .net core test. The result in blazor is always the same. Is there a list of not supported functionality? And how can I use 3rd Party API's if the build don't tell me whether they contain such not supported functionality?

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-blazorIncludes: Blazor, Razor Components

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions