[Python-modules-commits] [python-pyld] 240/276: Specify accept header w/document loader.
Wolfgang Borgert
debacle at moszumanska.debian.org
Wed Oct 8 23:48:15 UTC 2014
This is an automated email from the git hooks/post-receive script.
debacle pushed a commit to branch master
in repository python-pyld.
commit c99500c77eaa2717b7ce57c752e65d1b784c0a46
Author: Dave Longley <dlongley at digitalbazaar.com>
Date: Thu Apr 17 13:12:35 2014 -0400
Specify accept header w/document loader.
---
lib/pyld/jsonld.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/pyld/jsonld.py b/lib/pyld/jsonld.py
index 6305439..ca83a97 100644
--- a/lib/pyld/jsonld.py
+++ b/lib/pyld/jsonld.py
@@ -303,6 +303,8 @@ def load_document(url):
try:
https_handler = VerifiedHTTPSHandler()
url_opener = urllib_build_opener(https_handler)
+ url_opener.addheaders = [
+ ('Accept', 'application/ld+json, application/json')]
with closing(url_opener.open(url)) as handle:
doc = {
'contextUrl': None,
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-pyld.git
More information about the Python-modules-commits
mailing list