![]() |
v1.3.0.0
|
Network APIs provide interfaces for exchanging data with remote or local sources.
Net
namespace contains:An implementation of the common Web Fetch API as described, for example, on MDN, with a few differences and an expanded feature set.
The two main interfaces for the Fetch API are the Net.fetch()
and Net.request()
functions, which are both essentially wrappers around an XMLHttpRequest object. fetch()
provides an asynchronous Promise-based interface, while request()
returns results directly (synchronously).
Net.wsGet()
and Net.wsSend()
static methods for receiving and sending single messages via WebSocket
client requests.Headers
interface of the Fetch API allows you to perform various actions on HTTP request and response headers. (Implementation matches MDN documentation.)Request
- The Request interface of the Fetch API represents a resource request.Response
- The Response interface of the Fetch API represents the response to a request.Socket
- The Socket namespace contains constants relating to network socket operations, such as WebSockets.WebSocket
- Implementation of the WebSocket Web API client, with extensions similar to the NodeJS version. Namespaces | |
namespace | Net |
namespace | Socket |
Members | |
class | Request |
class | Response |
class | WebSocket |