slumber
slumber copied to clipboard
Delete can't contain data
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")