slumber icon indicating copy to clipboard operation
slumber copied to clipboard

Delete can't contain data

Open PetrDlouhy opened this issue 5 years ago • 0 comments

Some APIs require to send data through the HTTP delete request. The slumber doesn't allow this, so I have to use this hack:

        resp = self.api.lists(self.list_id).unsubscribe._request(
            "DELETE",
            data={"email": email},
        )
        if not 200 <= resp.status_code <= 299:
            raise Exception("Not unsubscribed")

PetrDlouhy avatar Feb 21 '19 14:02 PetrDlouhy