Skip to content

Added json_put method #21

Open
wants to merge 3 commits into from
View
6 lib/nestful.rb
@@ -40,4 +40,8 @@ def json_get(url, params = nil)
def json_post(url, params = nil)
post(url, :format => :json, :params => params)
end
-end
+
+ def json_put(url, options = {})
+ put(url, {:format => :json}.merge(options))
+ end
+end
Something went wrong with that request. Please try again.