curl-impersonatevsexcon
Curl-impersonate is a special build of libcurl
and cURL HTTP client that impersonates the four major browsers:
- Google Chrome
- Microsoft Edge
- Safari
- Firefox
Curl-impersonate achieves this by patching TLS and HTTP fingerprints to be identical to that of one of these real browsers.
Unlike other HTTP clients curl-impersonate can bypass TSL and HTTP fingerprinting and detection techniques though it does not implement anything for Javascript fingerprint or bypass.
Excon is a Ruby library for making HTTP requests. It is designed to be fast and efficient, and is often used as a building block for other Ruby libraries and frameworks.
One of the main features of Excon is its support for persistent connections, which allows it to reuse the same connection for multiple requests, reducing the overhead of establishing a new connection for each request.
Excon also supports streaming requests and responses, which allows you to read or write data to the server incrementally, without having to load the entire response into memory at once.
Highlights
Example Use
$ curl_chrome116 https://www.wikipedia.org
require 'excon'
# GET requests
response = Excon.get('https://jsonplaceholder.typicode.com/posts/1')
puts response.body
puts response.status
puts response.headers
# POST requests
response = Excon.post('https://jsonplaceholder.typicode.com/posts',
:body => { :title => 'foo', :body => 'bar', :userId => 1 }.to_json,
:headers => { 'Content-Type' => 'application/json' } )
puts response.body