ocpp
ocpp copied to clipboard
CSMS Http API :: 405: Not Allowed
Hello For a few days, I tried to run the example in this comment, https://github.com/mobilityhouse/ocpp/issues/86#issuecomment-620205346 but it shows me in the browser this error : 405: Not Allowed can you help me please
Can you elaborate on what you did? What request did you execute in the browser?
I thank you very much for your reply.
So, Firstly, I executed the command: python server.py
Then, in the browser, I opened : 127.0.0.1:8080
but it shows me this error 405: Not Allowed
The API doesn't implement a GET endpoint for /. Only a POST endpoint.
Trying to use a different HTTP method than POST will result in a 405.
Can you please tell me how I can execute the curl examples? I sincerely thank you for your help
The commands that you need to execute are listed in my post that contains the code. I'm not sure how to be more clear.
Had similar error, solved by changing line
site = web.TCPSite(runner, "localhost", 8080)
to
site = web.TCPSite(runner, "0.0.0.0", 8080)