curl-impersonatevshttparty
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.
HTTParty is a Ruby library that makes it easy to work with HTTP requests and responses. It is built on top of the Ruby standard library's Net::HTTP and provides a simple, easy-to-use interface for making requests and handling responses.
One of the main features of HTTParty is its ability to automatically parse response bodies as JSON, XML, or other formats. This allows developers to easily access the data returned by an API without having to manually parse the response.
Highlights
Example Use
$ curl_chrome116 https://www.wikipedia.org
require 'httparty'
# get request:
response = HTTParty.get('http://httpbin.org/get')
puts response.body
puts response.code
puts response.message
puts response.headers.inspect
# post request
response = HTTParty.post('http://httpbin.org/post',
:body => { :title => 'foo', :body => 'bar', :userId => 1 }.to_json,
:headers => { 'Content-Type' => 'application/json' } )
puts response.body