Method: OAuth::AccessToken#post

Defined in:
lib/oauth/tokens/access_token.rb

#post(path, body = "", headers = {}) ⇒ Object

Make a regular POST request using AccessToken

@response = @token.post('/people')
@response = @token.post('/people', { :name => 'Bob', :email => '[email protected]' })
@response = @token.post('/people', { :name => 'Bob', :email => '[email protected]' }, { 'Accept' => 'application/xml' })
@response = @token.post('/people', nil, {'Accept' => 'application/xml' })
@response = @token.post('/people', @person.to_xml, { 'Accept'=>'application/xml', 'Content-Type' => 'application/xml' })


48
49
50
# File 'lib/oauth/tokens/access_token.rb', line 48

def post(path, body = "", headers = {})
  request(:post, path, body, headers)
end