Typhoeus v0.5.0 Release Notes
-
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
andTyphoeus::Multi
are nowEthon::Easy
andEthon::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
, insteadResponse#headers
returning the last header and response#redirections returning the responses with headers generated through redirectionsInstead 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:
- Zero bytes in strings are escaped for libcurl
- ➕ Add support for socks5 hostname proxy type ( eweathers, #183 )
- Post body is encoded ( Rohan Deshpande, #143 )
- 0️⃣ Set default user agent ( Steven Shingler, #176 )