@@ -115,8 +115,6 @@ def _retrying_request(op, url, data, headers):
115115 response = HTTP_CONNECTION .getresponse ()
116116 status = response .status
117117 rdata = response .read ()
118- request_id = response .getheader ("x-rosetteapi-request-id" )
119- processed_language = response .getheader ("x-rosetteapi-processed-language" )
120118 response_headers ["responseHeaders" ] = (dict (response .getheaders ()))
121119 if status < 500 :
122120 if not REUSE_CONNECTION :
@@ -513,7 +511,7 @@ def info(self):
513511 self .logger .info ('info: ' + url )
514512 headers = {'Accept' : 'application/json' }
515513 if self .user_key is not None :
516- headers ["user_key " ] = self .user_key
514+ headers ["X-RosetteAPI-Key " ] = self .user_key
517515 r = _get_http (url , headers = headers )
518516 return self .__finish_result (r , "info" )
519517
@@ -526,7 +524,7 @@ def checkVersion(self):
526524 self .logger .info ('info: ' + url )
527525 headers = {'Accept' : 'application/json' }
528526 if self .user_key is not None :
529- headers ["user_key " ] = self .user_key
527+ headers ["X-RosetteAPI-Key " ] = self .user_key
530528 r = _post_http (url , None , headers = headers )
531529 return self .__finish_result (r , "info" )
532530
@@ -542,7 +540,7 @@ def ping(self):
542540 self .logger .info ('Ping: ' + url )
543541 headers = {'Accept' : 'application/json' }
544542 if self .user_key is not None :
545- headers ["user_key " ] = self .user_key
543+ headers ["X-RosetteAPI-Key " ] = self .user_key
546544 r = _get_http (url , headers = headers )
547545 return self .__finish_result (r , "ping" )
548546
@@ -587,7 +585,7 @@ def call(self, parameters):
587585 params_to_serialize = parameters .serialize ()
588586 headers = {'Accept' : "application/json" , 'Accept-Encoding' : "gzip" }
589587 if self .user_key is not None :
590- headers ["user_key " ] = self .user_key
588+ headers ["X-RosetteAPI-Key " ] = self .user_key
591589 headers ['Content-Type' ] = "application/json"
592590 r = _post_http (url , params_to_serialize , headers )
593591 # pprint.pprint(headers)
0 commit comments