Skip to content

Commit 11a1ab8

Browse files
committed
version bump
1 parent 9a9cf66 commit 11a1ab8

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

azure-devops/azure/devops/client.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def add_user_agent(self, user_agent):
4646
if user_agent is not None:
4747
self.config.add_user_agent(user_agent)
4848

49-
def _send_request(self, request, headers=None, content=None, **operation_config):
49+
def _send_request(self, request, headers=None, content=None, media_type=None, **operation_config):
5050
"""Prepare and send request object according to configuration.
5151
:param ClientRequest request: The request object to be sent.
5252
:param dict headers: Any headers to add to the request.
@@ -57,10 +57,13 @@ def _send_request(self, request, headers=None, content=None, **operation_config)
5757
or (TRACE_ENV_VAR_COMPAT in os.environ and os.environ[TRACE_ENV_VAR_COMPAT] == 'true'):
5858
print(request.method + ' ' + request.url)
5959
logger.debug('%s %s', request.method, request.url)
60-
logger.debug('Request content: %s', content)
60+
if media_type is not None and media_type == 'application/json':
61+
logger.debug('Request content: %s', content)
6162
response = self._client.send(request=request, headers=headers,
6263
content=content, **operation_config)
63-
logger.debug('Response content: %s', response.content)
64+
if ('Content-Type' in response.headers
65+
and response.headers['Content-Type'].startswith('application/json')):
66+
logger.debug('Response content: %s', response.content)
6467
if response.status_code < 200 or response.status_code >= 300:
6568
self._handle_error(request, response)
6669
return response
@@ -94,7 +97,7 @@ def _send(self, http_method, location_id, version, route_values=None,
9497
headers['X-VSS-ForceMsaPassThrough'] = 'true'
9598
if Client._session_header_key in Client._session_data and Client._session_header_key not in headers:
9699
headers[Client._session_header_key] = Client._session_data[Client._session_header_key]
97-
response = self._send_request(request=request, headers=headers, content=content)
100+
response = self._send_request(request=request, headers=headers, content=content, media_type=media_type)
98101
if Client._session_header_key in response.headers:
99102
Client._session_data[Client._session_header_key] = response.headers[Client._session_header_key]
100103
return response

azure-devops/azure/devops/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
# Licensed under the MIT License. See License.txt in the project root for license information.
44
# --------------------------------------------------------------------------------------------
55

6-
VERSION = "5.0.0b5"
6+
VERSION = "5.0.0b6"

azure-devops/setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from setuptools import setup, find_packages
77

88
NAME = "azure-devops"
9-
VERSION = "5.0.0b5"
9+
VERSION = "5.0.0b6"
1010

1111
# To install the library, run the following
1212
#

0 commit comments

Comments
 (0)