Closed as not planned
Description
openedon Apr 21, 2023
there are multiple scenarios on APIs that return a link to a resources:
- paging returns a link to the next page
- long running operations return a link to the status monitor resource
- creation might return a location with 201 (not followed by the redirect handler)
We currently already generate a constructor overload for a raw URL, but finding the constructor is hard for client users.
We could emit a method named "FollowLocation(uri)" next to the Get/Post method that people would call, with the next link they received from the initial call.
Pseudo code example
var firstPage = await client.Users.GetAsync();
var secondPage = await client.Users.FollowLocationAsync(firstPage.NexLink);
We'd need an extension to trigger the generation of that method, next steps @darrelmiller to spec out the extension
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Type
Projects
Status
Done ✔️