MikeBrink / python-picnic-api

Unofficial Python wrapper for the Picnic API.
Apache License 2.0
53 stars 17 forks source link

Fixed "Request method 'POST' not supported" bug - Update client.py #5

Closed DaniKemper closed 3 years ago

DaniKemper commented 3 years ago

Picnic made changes to their api, if I tried to get a delivery, I got the following error: "Request method 'POST' not supported". This error is fixed by making a get request, instead of a post request.

MikeBrink commented 3 years ago

Hi,

I’ve tested the PR and it passes the tests, however the current master branch also works for me. It happens to be that the picnic api sometimes has some strange hiccups, could you maybe share your errors and how I could replicate them?

DaniKemper commented 3 years ago

Hi,

I get a delivery id by calling the following method: picnic.get_deliveries(summary = True). After that I want the load the delivery. This is done by calling picnic.get_delivery(deliveryId = args['id']). But I get the following response back: Response If I change the method to a GET request instead of a POST request, everything seem to work fine.

MikeBrink commented 3 years ago

Thanks for your clarification, it seems that I'll have to put in some time into error handling + writing proper unit tests