resp_link_url | R Documentation |
Parses URLs out of the the Link
header as defined by RFC 8288.
resp_link_url(resp, rel)
resp |
A httr2 response object, created by |
rel |
The "link relation type" value for which to retrieve a URL. |
Either a string providing a URL, if the specified rel
exists, or
NULL
if not.
# Simulate response from GitHub code search
resp <- response(headers = paste0("Link: ",
'<https://api.github.com/search/code?q=addClass+user%3Amozilla&page=2>; rel="next",',
'<https://api.github.com/search/code?q=addClass+user%3Amozilla&page=34>; rel="last"'
))
resp_link_url(resp, "next")
resp_link_url(resp, "last")
resp_link_url(resp, "prev")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.