summaryrefslogtreecommitdiff
path: root/talermerchantdemos/httpcommon
diff options
context:
space:
mode:
authorMS <ms@taler.net>2020-07-23 17:36:51 +0200
committerMS <ms@taler.net>2020-07-23 17:36:51 +0200
commit5b72f8bf8070b19b29e0e7f60c5b888a8ff6ea4b (patch)
tree3f5543cfbc4b34df58da2de884fde5666c5602b8 /talermerchantdemos/httpcommon
parenta3e6faefa6a254a757dda08a3e876da388ad9f8e (diff)
downloadtaler-merchant-demos-5b72f8bf8070b19b29e0e7f60c5b888a8ff6ea4b.tar.gz
taler-merchant-demos-5b72f8bf8070b19b29e0e7f60c5b888a8ff6ea4b.tar.bz2
taler-merchant-demos-5b72f8bf8070b19b29e0e7f60c5b888a8ff6ea4b.zip
fixes
Diffstat (limited to 'talermerchantdemos/httpcommon')
-rw-r--r--talermerchantdemos/httpcommon/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/talermerchantdemos/httpcommon/__init__.py b/talermerchantdemos/httpcommon/__init__.py
index 392eaa2..106e731 100644
--- a/talermerchantdemos/httpcommon/__init__.py
+++ b/talermerchantdemos/httpcommon/__init__.py
@@ -1,4 +1,6 @@
+import flask
import requests
+from urllib.parse import urljoin
##
# Return a error response to the client.
@@ -18,7 +20,7 @@ def err_abort(abort_status_code, **params):
# @param json the POST's body.
# @return the backend response (JSON format).
def backend_post(backend_url, endpoint, json):
- headers = {"Authorization": "ApiKey " + APIKEY}
+ headers = {"Authorization": "ApiKey sandbox"}
try:
resp = requests.post(
urljoin(backend_url, endpoint), json=json, headers=headers
@@ -51,7 +53,7 @@ def backend_post(backend_url, endpoint, json):
# @return the JSON response from the backend, or a error response
# if something unexpected happens.
def backend_get(backend_url, endpoint, params):
- headers = {"Authorization": "ApiKey " + APIKEY}
+ headers = {"Authorization": "ApiKey sandbox"}
try:
resp = requests.get(
urljoin(backend_url, endpoint), params=params, headers=headers