new SGAppsServerResponse(response, server)
- Source:
Parameters:
Name | Type | Description |
---|---|---|
response |
ServerResponse | |
server |
SGAppsServer |
Members
_destroy :Array.<function()>
- Source:
Array of functions to be called on response end
Type:
- Array.<function()>
_flags :object
- Source:
Properties:
Name | Type | Description |
---|---|---|
finished |
boolean | will be true if response.end() has been called. |
sent |
boolean | Is true if all data has been flushed to the underlying system, immediately before the 'finish' event is emitted. |
closed |
boolean | Indicates that the the response is completed, or its underlying connection was terminated prematurely (before the response completion). |
Array of functions to be called on response end
Type:
- object
response :ServerResponse
- Source:
Type:
- ServerResponse
Methods
pipeFile(filePath, callback)
Parameters:
Name | Type | Description |
---|---|---|
filePath |
string | |
callback |
SGAppsServerErrorOnlyCallback | represents a |
pipeFileStatic(filePath, fileName, callback, optionsopt)
Parameters:
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
filePath |
string | ||||||||||||||||||||||
fileName |
string | ||||||||||||||||||||||
callback |
SGAppsServerResponse.pipeFileStaticCallback | ||||||||||||||||||||||
options |
object |
<optional> |
Properties
|
redirect(url, optionsopt)
if it returns false
than the action was not possible
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
url |
string | |||||||||||||||||
options |
object |
<optional> |
Properties
|
send(data, optionsopt)
Parameters:
Name | Type | Attributes | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
string | Buffer | object | Array.<any> | |||||||||||||||||
options |
object |
<optional> |
Properties
|
sendError(error, optionsopt)
Parameters:
Name | Type | Attributes | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
error |
Error | ||||||||||||
options |
object |
<optional> |
Properties
|
sendStatusCode(statusCode)
Parameters:
Name | Type | Description |
---|---|---|
statusCode |
number |
Type Definitions
pipeFileStaticCallback(error)
Parameters:
Name | Type | Description |
---|---|---|
error |
Error |