Network

Access the network capabilities in the exporters.

Due to security reasons, the exporters have no access to the network itself (read more). However, we are still providing network capabilities through the Supernova SDK.

To use the network capabilities, access the network object on the SDK. Through that, you can invoke the network methods mentioned, like this:


                                                        
                                                        
                                                            const result = await sdk.network.fetch("https://example.com/data.json")
                                                        
                                                            

Make a request

Fires a network request using node-fetch library. The capability and the interface of this method perfectly mirrors what the node-fetch library offers.


                                                        
                                                        
                                                            async fetch(url: RequestInfo, init?: RequestInit): Promise<Response>