aboutsummaryrefslogtreecommitdiff
path: root/src/exchange-lib/exchange_api_deposit.c
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2018-09-22 01:21:55 +0200
committerFlorian Dold <florian.dold@gmail.com>2018-09-22 01:21:55 +0200
commit4e0c95f0c26a4cfdfd6d2499d13e6c1238fa5e94 (patch)
treebdbb71b69716b7873c285c88d165ddf8dea3e04b /src/exchange-lib/exchange_api_deposit.c
parent310b120d5d8c7b67d8a36c8c7d8c4933ec4ff7f3 (diff)
put curl default options on one place
Diffstat (limited to 'src/exchange-lib/exchange_api_deposit.c')
-rw-r--r--src/exchange-lib/exchange_api_deposit.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/exchange-lib/exchange_api_deposit.c b/src/exchange-lib/exchange_api_deposit.c
index 50d52588d..53fd3c6e6 100644
--- a/src/exchange-lib/exchange_api_deposit.c
+++ b/src/exchange-lib/exchange_api_deposit.c
@@ -30,6 +30,7 @@
#include "taler_exchange_service.h"
#include "exchange_api_handle.h"
#include "taler_signatures.h"
+#include "curl_defaults.h"
/**
@@ -490,7 +491,7 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange,
dh->amount_with_fee = *amount;
dh->coin_value = dki->value;
- eh = curl_easy_init ();
+ eh = TEL_curl_easy_get (dh->url);
GNUNET_assert (NULL != (dh->json_enc =
json_dumps (deposit_obj,
JSON_COMPACT)));
@@ -500,18 +501,10 @@ TALER_EXCHANGE_deposit (struct TALER_EXCHANGE_Handle *exchange,
dh->url);
GNUNET_assert (CURLE_OK ==
curl_easy_setopt (eh,
- CURLOPT_URL,
- dh->url));
- GNUNET_assert (CURLE_OK ==
- curl_easy_setopt (eh,
CURLOPT_POSTFIELDS,
dh->json_enc));
GNUNET_assert (CURLE_OK ==
curl_easy_setopt (eh,
- CURLOPT_ENCODING,
- "deflate"));
- GNUNET_assert (CURLE_OK ==
- curl_easy_setopt (eh,
CURLOPT_POSTFIELDSIZE,
strlen (dh->json_enc)));
ctx = MAH_handle_to_context (exchange);