-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Net::HTTP to a faster HTTP client. #15
Comments
Take in account log options. |
May I pick this one? |
@mateusluizfb Yes, you may! My current choice is HTTP (https://github.com/httprb/http), mainly because Typhoeus has not been updated. Besides, the maintainers of HTTP are working on version 4 that includes good support for logging: httprb/http#499. For now we can keep Correios CEP logs as we have. Thanks. |
If you want to see how the things are going https://github.com/mateusluizfb/correios-cep/tree/feature/change-http-client |
@prodis the logging feature that you linked it's not released in the stable version, do you mind wait until it's done? |
@mateusluizfb For now just replace When the version of |
Ok |
@mateusluizfb require 'http'
require 'logger'
HTTP.use(logging: { logger: Logger.new(STDOUT) }).get('http://httpbin.org/get')
# => #<HTTP::Response/1.1 200 OK {"Connection"=>"close", "Server"=>"gunicorn/19.9.0", "Date"=>"Mon, 15 Oct 2018 22:17:31 GMT", "Content-Type"=>"application/json", "Content-Length"=>"194", "Access-Control-Allow-Origin"=>"*", "Access-Control-Allow-Credentials"=>"true", "Via"=>"1.1 vegur"}>
|
Nice!!! The PR is practically done then! |
@mateusluizfb Thank you for your contribution! |
Released on version 0.7.0. |
Some options:
Benchmark example: https://github.com/mrsimo/ruby-http-clients
The text was updated successfully, but these errors were encountered: