Core Typhoeus Interface: Request, Response, and Hydra
masterTyphoeus is built around three primary classes:
Typhoeus::Request: Represents an HTTP request object.Typhoeus::Response: Represents an HTTP response object.Typhoeus::Hydra: Manages making parallel HTTP connections.
You can instantiate a request with a URL and an optional hash of settings.
request = Typhoeus::Request.new(
"www.example.com",
method: :post,
body: "this is a request body",
params: { field1: "a field" },
headers: { Accept: "text/html" }
)