Kagi::Request
HTTP::Client wrapper methods for interacting with the Kagi API
Constants
Log = Kagi::Log.for(self)
Class methods
get(path : String, params : String) : HTTP::Client::Response
Perform a get request to a given path with params, attaching the API key set via KAGI_API_KEY.
Raises an exception if the request was unsuccessful.
post(path : String, body : String, headers : HTTP::Headers | Nil = nil) : HTTP::Client::Response
Perform a post request to a given path, body, and optional headers, attaching the API key set via KAGI_API_KEY.
Raises an exception if the request was unsuccessful.