-
Notifications
You must be signed in to change notification settings - Fork 220
Basic Auth and OAuth
igrigorik edited this page Jan 31, 2011
·
1 revision
To perform a Basic-Auth handshake, specify the authorization key inside of your headers. First field is the username, second is the password:
EventMachine.run do
http = EventMachine::HttpRequest.new('http://www.website.com/').get :head => {'authorization' => ['user', 'pass']}
http.callback { }
end
For an example of performing an OAuth signed request, check the examples directory in the repo.