From 3e0369f12e74d980b50aa03cc10261422c80cb62 Mon Sep 17 00:00:00 2001 From: Ingmar Steen Date: Mon, 26 May 2014 13:57:14 +0200 Subject: [PATCH] Rename header Content-type to Content-Type. oauth2 is pretty strict about the uppercase T and basically ruins the request: It doesn't put the OAuth data in the request's headers but replaces the body instead. Refs #42. --- trello/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trello/__init__.py b/trello/__init__.py index 5a44404f..51acf368 100644 --- a/trello/__init__.py +++ b/trello/__init__.py @@ -159,7 +159,7 @@ def fetch_json( """ Fetch some JSON from Trello """ if http_method in ("POST", "PUT", "DELETE"): - headers['Content-type'] = 'application/json' + headers['Content-Type'] = 'application/json' headers['Accept'] = 'application/json' url = self.build_url(uri_path, query_params)