Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added json_put method #21

Open
wants to merge 3 commits into from

1 participant

@zlu
zlu commented

Since there are already json_get and json_post, I added json_put and am using it for Kazoo-rb.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 31, 2012
  1. @zlu

    Added helper method json_put

    zlu authored
Commits on Aug 1, 2012
  1. @zlu

    Added json_put method

    zlu authored
Commits on Aug 3, 2012
  1. @zlu

    Removed call to execute

    zlu authored
This page is out of date. Refresh to see the latest.
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/nestful.rb
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.