[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [gnunet] 48/75: Expanding libgnunetcurl.
From: |
gnunet |
Subject: |
[GNUnet-SVN] [gnunet] 48/75: Expanding libgnunetcurl. |
Date: |
Thu, 09 Aug 2018 23:58:45 +0200 |
This is an automated email from the git hooks/post-receive script.
martin-schanzenbach pushed a commit to branch master
in repository gnunet.
commit 1a7fbccc8b3fd6fc070d134892e736503286ef1b
Author: Marcello Stanisci <address@hidden>
AuthorDate: Wed Jun 13 18:38:08 2018 +0200
Expanding libgnunetcurl.
Adding a method to let the user append
a custom request header.
---
src/curl/curl.c | 19 +++++++++++++++++++
src/include/gnunet_curl_lib.h | 11 +++++++++++
2 files changed, 30 insertions(+)
diff --git a/src/curl/curl.c b/src/curl/curl.c
index 2d0b09d92..cdd39ab8e 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
diff --git a/src/include/gnunet_curl_lib.h b/src/include/gnunet_curl_lib.h
index 17e9aeea4..2b2442a52 100644
--- a/src/include/gnunet_curl_lib.h
+++ b/src/include/gnunet_curl_lib.h
@@ -99,6 +99,17 @@ GNUNET_CURL_get_select_info (struct GNUNET_CURL_Context *ctx,
/**
+ * 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);
+
+/**
* Run the main event loop for the CURL interaction.
*
* @param ctx the library context
--
To stop receiving notification emails like this one, please contact
address@hidden
- [GNUnet-SVN] [gnunet] 31/75: -wip error gns, (continued)
- [GNUnet-SVN] [gnunet] 31/75: -wip error gns, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 36/75: tell mysql that our integers are unsigned, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 40/75: doc: Add new files to Makefile., gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 38/75: rps profiler: generate output for randomness tests, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 45/75: fix, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 41/75: some changes and work in user handbook., gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 46/75: mariadb, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 51/75: -Merge branch 'master' of ssh://gnunet.org/gnunet into gsoc2018/rest_api, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 47/75: remove dead file, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 56/75: -Merge branch 'master' of ssh://gnunet.org/gnunet into gsoc2018/rest_api, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 48/75: Expanding libgnunetcurl.,
gnunet <=
- [GNUnet-SVN] [gnunet] 13/75: doc: stagging file 'FROM_SOURCE' with old repetive instructions, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 35/75: ensure datacache does not return expired records, fixig pq behavior with respect to FOREVER absolute time, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 27/75: rps profiler: rewrite statistics handling, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 44/75: fix, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 43/75: seems like mysql is currently broken in Guix, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 49/75: update dockerfile, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 58/75: added name search, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 61/75: fix makefiles, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 53/75: -Merge branch 'master' of ssh://gnunet.org/gnunet into gsoc2018/rest_api, gnunet, 2018/08/09
- [GNUnet-SVN] [gnunet] 54/75: -Merge branch 'master' of ssh://gnunet.org/gnunet into gsoc2018/rest_api, gnunet, 2018/08/09