aboutsummaryrefslogtreecommitdiff
path: root/src/curl/curl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/curl/curl.c')
-rw-r--r--src/curl/curl.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/curl/curl.c b/src/curl/curl.c
index 2d0b09d92d..cdd39ab8e1 100644
--- a/src/curl/curl.c
+++ b/src/curl/curl.c
@@ -448,6 +448,25 @@ download_get_result (struct DownloadBuffer *db,
/**
+ * Add custom request header.
+ *
+ * @param ctx cURL context.
+ * @param header header string; will be given to the context AS IS.
+ * @return #GNUNET_OK if no errors occurred, #GNUNET_SYSERR otherwise.
+ */
+int
+GNUNET_CURL_append_header (struct GNUNET_CURL_Context *ctx,
+ const char *header)
+{
+ ctx->json_header = curl_slist_append (ctx->json_header,
+ header);
+ if (NULL == ctx->json_header)
+ return GNUNET_SYSERR;
+
+ return GNUNET_OK;
+}
+
+/**
* Run the main event loop for the Taler interaction.
*
* @param ctx the library context