-
-
Save hanshasselberg/4963141 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> require 'typhoeus' | |
#=> true | |
> Typhoeus::Config.verbose = true | |
> Typhoeus.get("www.example.com") | |
* About to connect() to www.example.com port 80 (#0) | |
* Trying 2001:500:88:200::10... | |
* Failed to connect to 2001:500:88:200::10: No route to host | |
* Undefined error: 0 | |
* Trying 192.0.43.10... | |
* connected | |
* Connected to www.example.com (192.0.43.10) port 80 (#0) | |
> GET / HTTP/1.1 | |
Host: www.example.com | |
Accept: */* | |
User-Agent: Typhoeus - https://github.com/typhoeus/typhoeus | |
* HTTP 1.0, assume close after body | |
< HTTP/1.0 302 Found | |
< Location: http://www.iana.org/domains/example/ | |
< Server: BigIP | |
* HTTP/1.0 connection set to keep alive! | |
< Connection: Keep-Alive | |
< Content-Length: 0 | |
< | |
* Connection #0 to host www.example.com left intact | |
#=> #<Typhoeus::Response> | |
irb(main):005:0> Typhoeus.get("www.example.com") | |
* Re-using existing connection! (#0) with host www.example.com | |
* Connected to www.example.com (192.0.43.10) port 80 (#0) | |
> GET / HTTP/1.0 | |
Host: www.example.com | |
Accept: */* | |
User-Agent: Typhoeus - https://github.com/typhoeus/typhoeus | |
* HTTP 1.0, assume close after body | |
< HTTP/1.0 302 Found | |
< Location: http://www.iana.org/domains/example/ | |
< Server: BigIP | |
< Connection: close | |
< Content-Length: 0 | |
< | |
* Closing connection #0 | |
#=> #<Typhoeus::Response> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment