From 606ae999528317882116150b8a43126f4bb54206 Mon Sep 17 00:00:00 2001 From: Serghei MIHAI Date: Tue, 3 Feb 2015 16:24:52 +0100 Subject: [PATCH] sending correct headers while provisionning services --- ckanext/ozwillo_organization_api/plugin.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ckanext/ozwillo_organization_api/plugin.py b/ckanext/ozwillo_organization_api/plugin.py index 6a8e61d..358d6f5 100644 --- a/ckanext/ozwillo_organization_api/plugin.py +++ b/ckanext/ozwillo_organization_api/plugin.py @@ -110,9 +110,12 @@ def create_organization(context, data_dict): 'motivation': 'Used to link user to the organization' }] } + headers = {'Content-type': 'application/json', + 'Accept': 'application/json'} requests.post(registration_uri, data = services, - auth=(client_id, client_secret) + auth=(client_id, client_secret), + headers=headers ) except Exception, e: log.debug('Exception "%s" occured while creating organization' % e)