1

The Gibbon Gem seems quite versatile. I managed to use it and create GET requests. For example, I am able to do a GET request and get all information on an order on Mailchimp. But I somehow can't make a request with the method DELETE.

So here is my code:

gibbon.ecommerce.stores("YourStoreName")
                .orders("orderNumber")
                .retrieve(headers: {"method": "delete"})

The result is a GET request and a huge JSON with all information on the order. If I run the exact same request again, I get the same information back (even though I wanted to delete it)

Anyone have a good idea?

4

1 回答 1

1

通过写这个答案,我自己找到了解决方案。

正确的解决方案是使用 .delete 方法(而不是尝试在标题中指定方法)

gibbon.ecommerce.stores("YourStoreName")
                .orders("orderNumber")
                .delete

将答案保留在这里,因为也许其他人会发现这很有用。

于 2017-12-09T14:30:34.997 回答