You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
When you’re developing with Ruby, it’s pretty inevitable that at some point you come across an HTTP API that doesn’t have a gem available. While writing Hopefully Sunny I ran into just that situation with World Weather Online’s weather API. It’s often really tempting to go searching for a different API to use instead, but it’s actually not so hard to just write your own wrapper library. Let’s take
Ruby 上で http を叩いた通信見たい時に、毎回同じ事をやってるので抽象化して http-dump というライブラリを作った。 https://github.com/hotchpotch/http-dump $ gem install http-dump require 'net/http' require 'uri' require 'http-dump' HTTPDump.dump { Net::HTTP.get(URI('http://example.com')) } と http でやりとりしてるコードを block で囲むと、以下のように出力される。 > GET http://example.com/ with headers {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=
Ruby の HTTP クライアントライブラリ Faraday が便利そう Ruby の HTTP クライアントライブラリ Faraday が便利そう API ラッパの開発には RestClient gem だとか OAuth の必要なものは Net/HTTP + OAuth gem を使ってた Twitter gem や Instagram gem など API ライブラリのソースを読んでみると Faraday gem というものがよく使われてた なんとなく気になったので Faraday について調べてみた ついでに Tumblife gem を Faraday を使うようにした 以下そのメモ Faraday って何? Faraday is an HTTP client lib that provides a common interface over many adapters (su
Ruby blog with daily news, links, code and tips Webサービスが多様化する中、最近のWebサイトやWebアプリケーションにはより多くのHTTPリクエストを並列に処理する必要が求められているかもしれない。とくにTwitterのように細かいメッセージを頻繁にやりとりするようなサービスを構築する、またはそうしたサービスに対応するとなると、システム側も高速な並列HTTP処理が必要になる。 Ruby InsideにおいてTyphoeus: A High Speed, Parallel HTTP Library for Rubyのもと、Rubyで活用できる高速並列HTTPライブラリ「Typhoeus」が紹介されている。Rubyデベロッパは一度チェックしておきたい。組み込みのNET::HTTPライブラリと比較してもHTTPartyよりも多種多様なHTTPリ
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く