Internet Access
Calling the open internet: InternetModule, fetch requests and responses, headers, and blobs.
Commonly used
InternetModuleProvides access to the open internet.BlobRepresents a blob, which is a file-like object of immutable, raw data.RemoteServiceHttpRequestA http request which can be sent using the RemoteServiceModule.RequestRepresents an HTTP request used by the Fetch API in RemoteServiceModule.ResponseRepresents an HTTP response used by the Fetch API in RemoteServiceModule.
Guides
Internet AccessUse the Fetch API and InternetModule in a SPECS Lens to make HTTPS requests, call external APIs, download media, and check whether the internet is available.WebSocketConnect a SPECS Lens to real-time data streams over the internet with the WebSocket API, for live updates and two-way communication.StorageCreate a Snap Cloud storage bucket and download images, 3D models, and audio from it into a SPECS Lens.Edge FunctionsDeploy a Snap Cloud edge function from the dashboard and call it from a SPECS Lens, with a sum example and an image round trip through Storage.MediaCapture images, video, and microphone audio on SPECS, upload them to Snap Cloud Storage, or stream them live over Realtime to a web viewer.Snapchat Places APISnapchat Places API for Lenses, which powers how different places interact in the Snapchat Map, offers Lens Developers a way to bringing the Snapchat map into a Lens.
All APIs in this topic
Require modules with require('LensStudio:<name>').
Components, assets, and modules
| API | Description |
|---|---|
| InternetModule SPECS Camera Kit | Provides access to the open internet. |
Objects and data
| API | Description |
|---|---|
| Blob SPECS Camera Kit | Represents a blob, which is a file-like object of immutable, raw data. |
| Headers SPECS | Headers for the Fetch API in RemoteServiceModule. |
| RemoteServiceHttpRequest SPECS Camera Kit | A http request which can be sent using the RemoteServiceModule. |
| RemoteServiceHttpResponse SPECS Camera Kit | The response returned by a RemoteServiceHttpRequest call. |
| Request SPECS | Represents an HTTP request used by the Fetch API in RemoteServiceModule. |
| Response SPECS | Represents an HTTP response used by the Fetch API in RemoteServiceModule. |
| WebSocketOptions SPECS Camera Kit | Additional settings applied when opening a WebSocket connection with InternetModule#createWebSocket. |
| WebViewOptions | WebViewOptions allow you to specify various aspects of the WebView that will be created. |
Related topics
Cloud, Networking & Storage › Remote Assets & MediaLoading media and assets at runtime: RemoteMediaModule, remote references, dynamic resources, and image upload.Cloud, Networking & Storage › WebSocketsTwo-way connections to a server: WebSocket and its events.Cloud, Networking & Storage › Snap CloudSnap Cloud authentication and databases through SupabaseModule and SupabaseProject.