オマーン旅行 2024 2024年のゴールデンウィーク前半はオマーンの首都マスカットに旅行に行ってきたのでその旅の記録を書く。 GWに妻が子どもを実家に連れて帰るとのことで、5日間の自由時間が手に入ったので、ここぞとばかりに海外旅行行きを決めた。 なぜオマーン 5日しかなく、複数国を…
![POST可能なRubyのNet::HTTP偽装テストライブラリWebMock - きたももんががきたん。](https://cdn-ak-scissors.b.st-hatena.com/image/square/06a15c64ba0ceec233d86d71001ebb29a9dcbf5d/height=288;version=1;width=512/https%3A%2F%2Fcdn.blog.st-hatena.com%2Fimages%2Ftheme%2Fog-image-1500.png)
This document summarizes and compares Ruby HTTP client libraries. It discusses the sync and async APIs of 16 libraries including Net::HTTP, HTTPClient, and Faraday. It covers their compatibility, supported features like keep-alive connections, and performance based on benchmarks. The document recommends libraries based on priorities like speed, HTML handling, API clients, and SSL support. It encou
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=
俺得メモ。もう3回くらい同じこと調べたんでいい加減メモ残しておく。 Net::HTTP にset_debug_outputってメソッドがあってコイツに出力先を渡せばいい。残念ながらこのset_debug_outputはドキュメントには載ってないのでnet/httpのソース見てね。 require 'net/http' Net::HTTP.version_1_2 http = Net::HTTP.new("d.hatena.ne.jp", 80) http.set_debug_output $stderr http.start{|http| req = Net::HTTP::Get.new('/yuroyoro') res = http.request(req) print res.body } irbでやると irb(main):001:0> require 'net/http' => t
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く