Skip to content

Recommended Usage in docs uses GetAsync; should it be GetJsonAsync? #1842

@CaiusJard

Description

@CaiusJard

I'm using v107.3. I get "does not contain a definitionfor .. and no accessible extension .." compiler errors when using the example code from the docs

Example code line from Recommended Usage docs says:

    => _client.GetAsync<GitHubRepo[]>("users/aspnet/repos");

Should it say GetJsonAsync, or do we need to import something that introduces this GetAsync<T>(string) method? Could that import be added to the docs?

Also same question to "simplified API" in making requests says:

var request = new MyRequest { Data = "foo" };
var response = await client.PostAsync<MyRequest, MyResponse>(request, cancellationToken);
// response will be of type TResponse

Should it be PostJsonAsync/have a string URL in there?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions