overwolf.web.WebServer
Overwolf APIs / overwolf / overwolf / web / WebServer
Properties
| Property | Type | Description |
|---|---|---|
onRequest | Event<RequestEvent> | Fired when the web server receives an incoming request. The event contains three strings: 'url', 'content' and 'contentType'. |
Methods
close()
close(): void;
Closes the web server. It can be re-opened again.
Returns
void
listen()
listen(callback: CallbackFunction<any>): void;
Listens for requests on the given port. If the port is already in use, or this instance is already listening, an error will be returned.
Parameters
| Parameter | Type | Description |
|---|---|---|
callback | CallbackFunction<any> | Fired with the status of the request. |
Returns
void