Sanity.request

You're seeing just the function request, go back to Sanity module for more information.
Link to this function

request(request, opts \\ [])

View Source

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 is false.

  • :dataset - Sanity dataset.

  • :http_options - Options to be passed to Finch.request/3. The default value is [].

  • :project_id - Sanity project ID.

  • :token - Sanity auth token.