aboutsummaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
Diffstat (limited to 'http.h')
-rw-r--r--http.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/http.h b/http.h
index f9d4593404..f9ee888c3e 100644
--- a/http.h
+++ b/http.h
@@ -20,6 +20,7 @@ struct slot_results {
long http_code;
long auth_avail;
long http_connectcode;
+ long retry_after;
};
struct active_request_slot {
@@ -157,6 +158,13 @@ struct http_get_options {
* request has completed.
*/
struct string_list *extra_headers;
+
+ /*
+ * After a request completes, contains the Retry-After delay in seconds
+ * if the server returned HTTP 429 with a Retry-After header (requires
+ * libcurl 7.66.0 or later), or -1 if no such header was present.
+ */
+ long retry_after;
};
/* Return values for http_get_*() */
@@ -167,6 +175,7 @@ struct http_get_options {
#define HTTP_REAUTH 4
#define HTTP_NOAUTH 5
#define HTTP_NOMATCHPUBLICKEY 6
+#define HTTP_RATE_LIMITED 7
/*
* Requests a URL and stores the result in a strbuf.