ujihisa / net-https-wrapper

For a programmer who thinks net/https of ruby standard library sucks.

This URL has Read+Write access

name age message
file README.md Sat Aug 15 18:32:17 -0700 2009 Fine. [ujihisa]
file net-https-wrapper.gemspec Sat Aug 15 18:35:52 -0700 2009 And you? [ujihisa]
file net-https-wrapper.rb Sat Aug 15 18:32:17 -0700 2009 Fine. [ujihisa]
file net-https-wrapper_spec.rb Sat Aug 15 20:48:08 -0700 2009 Great. [ujihisa]
README.md

net/https wrapper

require 'net-https-wrapper'

a = Net::HTTP.post(
  'https://www.google.com/accounts/ClientLogin',
  {
    'Email' => email,
    'Passwd' => pass,
    'service' => 'blogger',
    'accountType' => 'HOSTED_OR_GOOGLE',
    'source' => 'ujihisa-bloggervim-1'
  }.map {|i, j| "#{i}=#{j}" }.join('&'),
  {'Content-Type' => 'application/x-www-form-urlencoded'})
a.body.lines.to_a.maph {|i| i.split('=') }['Auth'].chomp