Typhoeus v0.5.0 Release Notes

  • Full Changelog

    Major Changes:

    • Ethon integration

      • Params are url params and a body is always a body for every request type
      • The options you can set might have a slightly other names, as Ethon sticks to libcurl names. See Easy.new for a description.
      • Request parameter and body are properly encoded (only POST multiform body is not)
      • No more header sanitizing. Before: :headers => { 'user_agent' => 'Custom' } was modified to :headers => { 'User-Agent' => 'Custom' }
      • Typhoeus::Easy and Typhoeus::Multi are now Ethon::Easy and Ethon::Multi
    • Request shortcuts: Typhoeus.get("www.google.de")

    • 🔧 Global configuration:

      Typhoeus.configure do |config|
      config.verbose = true
      config.memoize = true
      end
      
    • No more Response#headers_hash, instead Response#headers returning the last header and response#redirections returning the responses with headers generated through redirections

    • Instead of defining the same callbacks on every request, you can define global callbacks:

      Typhoeus.on_complete { p "yay" }
      
    • The stubbing interface changed slightly. You now have the same syntax as for requests:

      Typhoeus.stub(url, options).and_return(response)
      
    • 👀 The following things were removed because they do not seemed to be used at all. Ping me if you disagree!

      • Typhoeus::Filter
      • Typhoeus::Remote
      • Typhoeus::RemoteMethod
      • Typhoeus::RemoteProxyObject
      • build in cache interface

    ✨ Enhancements:

    • 📚 Documentation ( Alex P, #188 )
    • Request#on_complete can hold multiple blocks.
    • Request#eql? recognizes when header/params/body has a different order, but still same keys and values ( Alex P, #194 )

    🐛 Bug Fixes: