For the hydra-client-go ListOAuth2Clients how do I...
# general
s
For the hydra-client-go ListOAuth2Clients how do I extract the token for the next page out of the response? Is there some utility function or do I need to parse the
Link
response header in my end?
The docs give methods like
Limit
and
Offset
but those don't seem to be available in the latest release, 2.2.1 unless I'm missing something
m
yea you you should use page_size and page_token when you make a request with page_size, the response will include a link header with URLs for the first page and next page. and then you need to parse the link header from the HTTP response - i don't have an example for that at hand though
s
Ah, there are no helper methods to parse? It looks like it's all added into a single string in that header?
s
yes we unfortunately don't have helpers in the SDK as they are auto-generated and it's simply not a thing in the generators... but you can probably find a library for your language, similar to https://github.com/tomnomnom/linkheader (no recommendation, just the first search result)
s
Gotcha, thank you!