resp_retry_after | R Documentation |
Computes how many seconds you should wait before retrying a request by
inspecting the Retry-After
header. It parses both forms (absolute and
relative) and returns the number of seconds to wait. If the heading is not
found, it will return NA
.
resp_retry_after(resp)
resp |
A httr2 response object, created by |
Scalar double giving the number of seconds to wait before retrying a request.
resp <- response(headers = "Retry-After: 30")
resp |> resp_retry_after()
resp <- response(headers = "Retry-After: Mon, 20 Sep 2025 21:44:05 UTC")
resp |> resp_retry_after()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.