Python Client Rest API Invocation - POST with empty body - Invalid character found in method name [{}POST]. HTTP method names must be tokens
Dieter Maurer
dieter at handshake.de
Fri Nov 20 13:52:49 EST 2020
Shelke, Bhushan wrote at 2020-11-19 15:12 +0000:
>I have a Tomcat+Java based server exposing REST APIs. I am writing a client in python to consume those APIs. Everything is fine until I send empty body in POST request. It is a valid use case for us. If I send empty body I get 400 bad request error - Invalid character found in method name [{}POST]. HTTP method names must be tokens.
`[{}POST]` would definitely be a wrong method.
I would use the Python debugger (--> module `pdb`) to
find out where it comes from.
More information about the Python-list
mailing list