ocpp icon indicating copy to clipboard operation
ocpp copied to clipboard

CSMS Http API :: 405: Not Allowed

Open Ocpp-S opened this issue 4 years ago • 6 comments
trafficstars

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

Ocpp-S avatar Apr 15 '21 11:04 Ocpp-S

Can you elaborate on what you did? What request did you execute in the browser?

OrangeTux avatar Apr 16 '21 06:04 OrangeTux

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

Ocpp-S avatar Apr 16 '21 14:04 Ocpp-S

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.

OrangeTux avatar Apr 19 '21 11:04 OrangeTux

Can you please tell me how I can execute the curl examples? I sincerely thank you for your help

Ocpp-S avatar Apr 19 '21 15:04 Ocpp-S

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.

OrangeTux avatar Apr 20 '21 07:04 OrangeTux

Had similar error, solved by changing line site = web.TCPSite(runner, "localhost", 8080) to site = web.TCPSite(runner, "0.0.0.0", 8080)

mathief123 avatar Apr 28 '21 15:04 mathief123