Repository navigation
Replies: 1 comment
|
HTTPX's If your API accepts a decimal as a JSON string, convert it explicitly before passing the payload: from decimal import Decimal
payload = {"value": str(Decimal("2.3"))}
response = client.post(url, json=payload)That sends |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi!
I would like to know if in the json parameter of a request, I'm allow to pass a dictionary one value of which is a
decimal.Decimal, where decimal is the module from Python standard library.If this json is stringified, it makes sense since the following assertion is true:
All reactions