From c1863a57884ee268f6b72db724382a35db6878b2 Mon Sep 17 00:00:00 2001 From: T8y8 Date: Sun, 30 Oct 2016 20:22:40 -0700 Subject: [PATCH] Fix missing token on requests --- tableauserverclient/server/endpoint/endpoint.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tableauserverclient/server/endpoint/endpoint.py b/tableauserverclient/server/endpoint/endpoint.py index b532abfcb..c90b91004 100644 --- a/tableauserverclient/server/endpoint/endpoint.py +++ b/tableauserverclient/server/endpoint/endpoint.py @@ -13,11 +13,13 @@ def __init__(self, parent_srv): @staticmethod def _make_common_headers(auth_token, content_type): - retval = {} + headers = {} if auth_token is not None: - retval['x-tableau-auth'] = auth_token + headers['x-tableau-auth'] = auth_token if content_type is not None: - retval['content-type'] = content_type + headers['content-type'] = content_type + + return headers def _make_request(self, method, url, content=None, request_object=None, auth_token=None, content_type=None): if request_object is not None: