def put(data = {})
      request = Request.new(@uri,
        headers: @headers,
        data: data,
      )
      request.put
    end
def put(data = {})
      request = Request.new(@uri,
        headers: @headers,
        data: data,
      )
      request.put
    end
PUT's a resource to the URI and returns the result based on its content
 type. JSON content will be parsed and returned as equivalent Ruby objects.
 All other content types will be returned as text.

 Assuming an api where each resource is namespaced with 'api/v1' and where
 a GET to the url http://www.example.com/api/v1/foo/99 responds with the
 following.

 Header:

   Content-Type: application/json

 Body:

   {
     "name": "Foo"
   }

 == Example

   class ExampleApi < HttpMagic::Api
     url 'www.example.com'
     namespace 'api/v1'
   end

   ExampleApi.foo[99].put(name: 'Changed Foo')
   => { "name" => "Changed Foo" }