Method: OAuth::AccessToken#put
- Defined in:
- lib/oauth/tokens/access_token.rb
#put(path, body = '', headers = {}) ⇒ Object
Make a regular PUT request using AccessToken
@response = @token.put('/people/123')
@response = @token.put('/people/123', { :name => 'Bob', :email => '[email protected]' })
@response = @token.put('/people/123', { :name => 'Bob', :email => '[email protected]' }, { 'Accept' => 'application/xml' })
@response = @token.put('/people/123', nil, { 'Accept' => 'application/xml' })
@response = @token.put('/people/123', @person.to_xml, { 'Accept' => 'application/xml', 'Content-Type' => 'application/xml' })
58 59 60 |
# File 'lib/oauth/tokens/access_token.rb', line 58 def put(path, body = '', headers = {}) request(:put, path, body, headers) end |