From a9ae2171b897dfc9635e9ab72a04d65379bf2208 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 16 Jan 2020 21:57:40 +0100 Subject: reuse TALER_url_join --- src/bank-lib/bank_api_common.c | 29 ----------------------------- 1 file changed, 29 deletions(-) (limited to 'src/bank-lib/bank_api_common.c') diff --git a/src/bank-lib/bank_api_common.c b/src/bank-lib/bank_api_common.c index 5e7ce6876..abdeee31a 100644 --- a/src/bank-lib/bank_api_common.c +++ b/src/bank-lib/bank_api_common.c @@ -68,33 +68,4 @@ TALER_BANK_setup_auth_ (CURL *easy, } -/** - * Obtain the URL to use for an API request. - * FIXME: duplicates MAH_path_to_url2, and likely also logic in util! - * FIXME: duplicates TEAH_path_to_url2, and likely also logic in util! - * - * @param u base URL of the bank. - * @param path Taler API path (i.e. "/history"). - * - * @return the full URL to use with cURL, must be - * freed by the caller. - */ -char * -TALER_BANK_path_to_url_ (const char *u, - const char *path) -{ - char *url; - - if ( ('/' == path[0]) && - (0 < strlen (u)) && - ('/' == u[strlen (u) - 1]) ) - path++; /* avoid generating URL with "//" from concat */ - GNUNET_asprintf (&url, - "%s%s", - u, - path); - return url; -} - - /* end of bank_api_common.c */ -- cgit v1.2.3