@@ -471,7 +471,7 @@ def call(self, method, path, data=None, need_auth=True):
471471 else :
472472 raise APIError (json_result .get ('message' ), response = result )
473473
474- def raw_call (self , method , path , data = None , need_auth = True ):
474+ def raw_call (self , method , path , data = None , need_auth = True , headers = None ):
475475 """
476476 Lowest level call helper. If ``consumer_key`` is not ``None``, inject
477477 authentication headers and sign the request.
@@ -490,12 +490,17 @@ def raw_call(self, method, path, data=None, need_auth=True):
490490 :param str path: api entrypoint to call, relative to endpoint base path
491491 :param data: any json serializable data to send as request's body
492492 :param boolean need_auth: if False, bypass signature
493+ :param dict headers: A dict containing the headers that should be sent to
494+ the OVH API. ``raw_call`` will override the
495+ OVH API authentication headers, as well as
496+ the Content-Type header.
493497 """
494498 body = ''
495499 target = self ._endpoint + path
496- headers = {
497- 'X-Ovh-Application' : self ._application_key
498- }
500+
501+ if headers is None :
502+ headers = {}
503+ headers ['X-Ovh-Application' ] = self ._application_key
499504
500505 # include payload
501506 if data is not None :
0 commit comments