Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 659 Bytes

response.md

File metadata and controls

23 lines (16 loc) · 659 Bytes

Response

The response object is created by the server and sent to the client.

Properties

res.id

A universally unique identifier (UUID) matching the req.id.

res.ipc

An object with two properties. channel specifies the channel being used by ipcMain to send messages. sender contains an instance of webContents used to send the message.

Methods

res.status(code)

Sets the HTTP status for the response.

res.status(400).send('Bad Request')

res.send([body])

Sends the response to the client. The body can be any javascript value.