Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

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

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 README.md
Octocat-spinner-32 net-https-wrapper.gemspec
Octocat-spinner-32 net-https-wrapper.rb
Octocat-spinner-32 net-https-wrapper_spec.rb
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
Something went wrong with that request. Please try again.