The single HTTP transport for Hunter.
request!/6 joins the endpoint path onto the base URL, sets
authentication headers from the Hunter.Client (none for a bare base
URL string), performs the request via Req, decodes the response
through Hunter.Api.Transformer, and raises Hunter.Error on failure.
Summary
Functions
Performs a request against the Mastodon API and returns the transformed entity.
Functions
Performs a request against the Mastodon API and returns the transformed entity.
Parameters
conn_or_base_url- aHunter.Client(authenticated) or a base URL string (unauthenticated, e.g. app registration and OAuth flows)method-:get,:post,:put,:patchor:deletepath- endpoint path, e.g."/api/v1/statuses"to- Hunter.Api.Transformer target (e.g.:status,:accounts,:empty), ornilfor the JSON-decoded body untouchedpayload- query params for:get/:delete; JSON body (map or keyword) or{:form_multipart, parts}for write verbsopts-headers: [{name, value}]extra request headers
Raises Hunter.Error on non-2xx responses and transport errors.