Skip to content

Commit b652544

Browse files
Add an option to provide "Accept" header to client request (#408)
Signed-off-by: Nir Argaman <[email protected]> Co-authored-by: Nir Argaman <[email protected]>
1 parent 06ee8b9 commit b652544

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

openshift/dynamic/client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def watch(self, resource, namespace=None, name=None, label_selector=None, field_
186186
yield event
187187

188188
@meta_request
189-
def request(self, method, path, body=None, **params):
189+
def request(self, method, path, body=None, accept_header=None, **params):
190190
if not path.startswith('/'):
191191
path = '/' + path
192192

@@ -217,7 +217,7 @@ def request(self, method, path, body=None, **params):
217217
form_params = []
218218
local_var_files = {}
219219
# HTTP header `Accept`
220-
header_params['Accept'] = self.client.select_header_accept([
220+
header_params['Accept'] = accept_header or self.client.select_header_accept([
221221
'application/json',
222222
'application/yaml',
223223
'application/vnd.kubernetes.protobuf'

0 commit comments

Comments
 (0)