From 135124714546fc973875f58619e40aeb170af264 Mon Sep 17 00:00:00 2001 From: Wade Simmons Date: Fri, 29 Jul 2011 19:04:16 -0700 Subject: [PATCH] fix the Accept header. I want to use raw_request to complete the OAuth flow, but it doesn't respond correctly unless the Accept header is correct. --- github2/request.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/github2/request.py b/github2/request.py index 6d0a1d8..d39e71f 100644 --- a/github2/request.py +++ b/github2/request.py @@ -131,7 +131,7 @@ def raw_request(self, url, extra_post_data, method="GET"): scheme, netloc, path, query, fragment = urlsplit(url) post_data = None headers = self.http_headers - headers["Accept"] = "text/html" + headers["Accept"] = "application/json" method = method.upper() if extra_post_data or method == "POST": post_data = self.encode_authentication_data(extra_post_data)