aboutsummaryrefslogtreecommitdiff
path: root/src/curl/curl.c
diff options
context:
space:
mode:
authorPhil <phil.buschmann@tum.de>2018-06-13 23:40:25 +0200
committerPhil <phil.buschmann@tum.de>2018-06-13 23:40:25 +0200
commit688bd873c3cb463090039f64b9f13b9a029695dc (patch)
treebc74703d4912da712d82f869237057405ad49060 /src/curl/curl.c
parenta006f82603921d7b6775c7a7be60c7f388c6a927 (diff)
parentc9b52f6ce67209e000d2f679a34c23bd4724b243 (diff)
downloadgnunet-688bd873c3cb463090039f64b9f13b9a029695dc.tar.gz
gnunet-688bd873c3cb463090039f64b9f13b9a029695dc.zip
-Merge branch 'master' of ssh://gnunet.org/gnunet into gsoc2018/rest_api
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 2d0b09d92..cdd39ab8e 100644
--- a/src/curl/curl.c
+++ b/src/curl/curl.c
@@ -448,6 +448,25 @@ download_get_result (struct DownloadBuffer *db,
448 448
449 449
450/** 450/**
451 * Add custom request header.
452 *
453 * @param ctx cURL context.
454 * @param header header string; will be given to the context AS IS.
455 * @return #GNUNET_OK if no errors occurred, #GNUNET_SYSERR otherwise.
456 */
457int
458GNUNET_CURL_append_header (struct GNUNET_CURL_Context *ctx,
459 const char *header)
460{
461 ctx->json_header = curl_slist_append (ctx->json_header,
462 header);
463 if (NULL == ctx->json_header)
464 return GNUNET_SYSERR;
465
466 return GNUNET_OK;
467}
468
469/**
451 * Run the main event loop for the Taler interaction. 470 * Run the main event loop for the Taler interaction.
452 * 471 *
453 * @param ctx the library context 472 * @param ctx the library context