summaryrefslogtreecommitdiff
path: root/talermerchantdemos/httpcommon/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'talermerchantdemos/httpcommon/__init__.py')
-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