Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ujihisa/net-https-wrapper

For a programmer who thinks net/https of ruby standard library sucks.
https://github.com/ujihisa/net-https-wrapper

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        

# 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