diff options
Diffstat (limited to 'include/git2')
-rw-r--r-- | include/git2/remote.h | 3 | ||||
-rw-r--r-- | include/git2/sys/transport.h | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h index a39e5a415..9237ca255 100644 --- a/include/git2/remote.h +++ b/include/git2/remote.h @@ -241,9 +241,10 @@ GIT_EXTERN(const git_refspec *)git_remote_get_refspec(const git_remote *remote, * @param direction GIT_DIRECTION_FETCH if you want to fetch or * GIT_DIRECTION_PUSH if you want to push * @param callbacks the callbacks to use for this connection + * @param custom_headers extra HTTP headers to use in this connection * @return 0 or an error code */ -GIT_EXTERN(int) git_remote_connect(git_remote *remote, git_direction direction, const git_remote_callbacks *callbacks); +GIT_EXTERN(int) git_remote_connect(git_remote *remote, git_direction direction, const git_remote_callbacks *callbacks, const git_strarray *custom_headers); /** * Get the remote repository's reference advertisement list diff --git a/include/git2/sys/transport.h b/include/git2/sys/transport.h index 4a75b0832..ca8617f3f 100644 --- a/include/git2/sys/transport.h +++ b/include/git2/sys/transport.h @@ -40,6 +40,11 @@ struct git_transport { git_transport_certificate_check_cb certificate_check_cb, void *payload); + /* Set custom headers for HTTP requests */ + int (*set_custom_headers)( + git_transport *transport, + const git_strarray *custom_headers); + /* Connect the transport to the remote repository, using the given * direction. */ int (*connect)( |