[ckan harvester] Add support for sending an API key
This commit is contained in:
parent
0ab5c53b47
commit
cfaba6e1e8
|
@ -36,6 +36,9 @@ class CKANHarvester(HarvesterBase):
|
|||
)
|
||||
|
||||
try:
|
||||
api_key = self.config.get('api_key',None)
|
||||
if api_key:
|
||||
http_request.add_header('Authorization',api_key)
|
||||
http_response = urllib2.urlopen(http_request)
|
||||
|
||||
return http_response.read()
|
||||
|
|
Loading…
Reference in New Issue