Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save marcelmaatkamp/339278 to your computer and use it in GitHub Desktop.
Save marcelmaatkamp/339278 to your computer and use it in GitHub Desktop.
def login() {
def http = new HTTPBuilder( 'https://www.google.com' )
http.request( POST, TEXT ) { req ->
uri.path = '/accounts/ClientLogin'
send URLENC, [
service: 'reader',
Email: username,
Passwd: password,
source: 'Testing couchdb',
continue:'http://www.google.com/'
]
response.success = { resp, text ->
def properties = new Properties()
properties.load(text)
return 'SID='+properties.SID
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment