Skip to content

Commit 397f04f

Browse files
authored
Merge pull request #6 from romatallinn/v0.0.7
v0.0.7 - quickfix: data argument manipulations in base request
2 parents 83681b2 + 7b6d12f commit 397f04f

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.0.7
2+
3+
Quickfix: fix data argument manipulations in base request.
4+
15
## 0.0.6
26

37
Quickfix: fix data argument in Payment's capture_sale method for passing split data.

braspag_sdk/utils/base_request.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,17 @@ def send_request(self, method, uri, data=None, params=None):
1818

1919
s = Session()
2020

21-
body = data
22-
2321
headers = {
2422
'User-Agent': "BraspagSdk/Python",
2523
'RequestId': str(uuid.uuid4()),
2624
**(self.authorization_headers or {}),
2725
}
2826

27+
body = data
2928
if not body:
3029
headers['Content-Length'] = '0'
3130
elif isinstance(data, ObjectJSON):
3231
body = body.toJSON()
33-
else:
34-
body = json.dumps(body)
3532

3633
if 'Content-Type' not in headers:
3734
headers["Content-Type"] = "application/json"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "braspag-sdk"
3-
version = "0.0.6"
3+
version = "0.0.7"
44
description = "An unofficial Python SDK for Braspag"
55
authors = [
66
"Roman Sirokov <sirokov@dizconto.com>",

0 commit comments

Comments
 (0)