HTTP Requests (Web Requests)

Make HTTP requests in Spatial using Unity's UnityWebRequest module. This allows you to fetch data from an external source, such as a REST API, and use it in your Spatial space. You should only send HTTP requests to trusted sources.

Warning

HTTP Requests are currently in closed beta. If you would like access, reach out to your Spatial contact or on our Discord.

Usage

Check out our Web Request template to see an example of fetching data from an external API. You can use web requests for data storage, analytics, remote configuration, error reporting, expensive calculations, and so much more!

Refer to Unity's UnityWebRequest documentation for more information on how to use the module.

Restrictions

  • Spatial only allows requests to secure domains (https). Requests to unsecure domains (http) are not permitted.
  • Requests to any Spatial domain (*.spatial.io) are not permitted.
  • Requests to localhost are not permitted.