Skip to content

Instantly share code, notes, and snippets.

@levinotik
Created November 2, 2011 16:44
Show Gist options
  • Save levinotik/1334167 to your computer and use it in GitHub Desktop.
Save levinotik/1334167 to your computer and use it in GitHub Desktop.
post request
email = ARGV[0]
password = ARGV[1]
uri = URI.parse("https://google.com/accounts/ClientLogin")
request = Net::HTTP::Post.new(uri.path)
request.set_form_data({'Email'=> email, 'Passwd' => password,'accountType'
=> 'GOOGLE', 'service' => 'ac2dm', 'source' => 'myexample'})
Net::HTTP.new(uri.host, url.port).request(request)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment