Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
Diffstat (limited to 'http.h')
-rw-r--r--http.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/http.h b/http.h
index d77c1b54f2..40404b4836 100644
--- a/http.h
+++ b/http.h
@@ -125,11 +125,16 @@ extern void append_remote_object_url(struct strbuf *buf, const char *url,
extern char *get_remote_object_url(const char *url, const char *hex,
int only_two_digit_prefix);
-/* Options for http_request_*() */
-#define HTTP_NO_CACHE 1
-#define HTTP_KEEP_ERROR 2
+/* Options for http_get_*() */
+struct http_get_options {
+ unsigned no_cache:1,
+ keep_error:1;
-/* Return values for http_request_*() */
+ /* If non-NULL, returns the content-type of the response. */
+ struct strbuf *content_type;
+};
+
+/* Return values for http_get_*() */
#define HTTP_OK 0
#define HTTP_MISSING_TARGET 1
#define HTTP_ERROR 2
@@ -142,7 +147,7 @@ extern char *get_remote_object_url(const char *url, const char *hex,
*
* If the result pointer is NULL, a HTTP HEAD request is made instead of GET.
*/
-int http_get_strbuf(const char *url, struct strbuf *content_type, struct strbuf *result, int options);
+int http_get_strbuf(const char *url, struct strbuf *result, struct http_get_options *options);
extern int http_fetch_ref(const char *base, struct ref *ref);