Sanity.request
You're seeing just the function
request
, go back to Sanity module for more information.
Specs
request(Sanity.Request.t(), keyword()) :: {:ok, Sanity.Response.t()} | {:error, Sanity.Response.t()}
Submits a request to the Sanity API. Returns {:ok, response}
upon success or {:error, response}
if a non-exceptional (4xx) error occurs. A Sanity.Error
will be raised if an
exceptional error, such as a 5xx response code or a network timeout, occurs.
Options
:api_version
- The default value is"v2021-03-25"
.:cdn
- Should the CDN be used? See the Sanity docs for details. The default value isfalse
.:dataset
- Sanity dataset.:http_options
- Options to be passed toFinch.request/3
. The default value is[]
.:project_id
- Sanity project ID.:token
- Sanity auth token.