sparkapi / spark_api

Ruby client library for communication with the Spark API
http://sparkplatform.com/docs/overview/api
Other
55 stars 35 forks source link

Stop sending the magic "D" in requests if there is nothing else to send #21

Closed longlostnick closed 11 years ago

longlostnick commented 11 years ago

It looks like we're sending "D" => {} with requests even if there are no other attributes or data being sent.

wlmcewen commented 11 years ago

What requests wouldn't send any attributes to the API? I'd like to understand the use case a little more before proceeding. Is your point that we should fail the request clientside?

longlostnick commented 11 years ago

DELETE and some PUT requests. Specifically the new CRUD stuff I've been adding recently (contacts/subscriptions/savedsearches). The new subscriptions has an example of a PUT with no request body when subscribing a contact to a subscription. (https://github.com/sparkapi/spark_api/pull/16/files#L2R19)

wlmcewen commented 11 years ago

Fixed with bb76fd92359a64e46d26fe28f50b167b9cfc10fe