Skip to content

Instantly share code, notes, and snippets.

@geoffgarside
Forked from levinotik/gist:1334167
Created November 2, 2011 16:46
Show Gist options
  • Save geoffgarside/1334176 to your computer and use it in GitHub Desktop.
Save geoffgarside/1334176 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