Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[1.4.0rc2] /api/login?passive=true as sent by printoid causes Bad Request #3381
Issue is caused by printoid still using request parameters and a GET instead of a json body in a POST as specified by the API: http://docs.octoprint.org/en/master/api/general.html#post--api-login
1.3.x still supported that. JSON decoding behaviour in 1.4.0 changed due to an update of a library, making the fallback of reading request parameters no longer work.
Bringing back the fallback for 1.4.x but this should also be fixed on Printoid's side by adhering to the API specification!
The issue is now fixed in Printoid (on the devel branch only) :
I will publish the new release as soon as possible :)
Right, just gave a try and indeed it is not necessary. Previously I was using POST with query parameters (instead of JSON encoded body) and it was running fine. I will then totally replace this call by a POST with JSON body. *Anthony STEPHAN* Senior Android Developer at Renault-Nissan-Mitsubishi Developer of Printoid for OctoPrint Mobile: +33 6 86 89 46 42 Email: Website: email@example.com https://printoid.net <https://play.google.com/store/apps/details?id=fr.yochi76.printoid.phones.premium> <https://play.google.com/store/apps/dev?id=5122015473710814043> <https://www.facebook.com/printoid/> <https://twitter.com/androidprintoid> <https://www.linkedin.com/in/stephananthony/> <https://www.patreon.com/printoid> SUPPORT MY WORK ON PATREON ! <https://www.patreon.com/printoid> Le mar. 10 déc. 2019 à 14:59, Gina Häußge <firstname.lastname@example.org> a écrit :…
* OctoPrint v1.3.12 and below -> still use POST with request parameters for retro compatibility That's actually not necessary, POST with JSON has always been the right thing, that the other stuff worked as well was just a left over from ... 1.1.x? — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#3381?email_source=notifications&email_token=ABP7IEANPFEXHOYFEYWU3NTQX6OE5A5CNFSM4JY5GEU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGPKHPQ#issuecomment-564044734>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABP7IEEIKVTMD5ZD5D5YDHDQX6OE5ANCNFSM4JY5GEUQ> .