new reflexContext()
- reflexContext.addids
- reflexContext.allocids
- reflexContext.count
- reflexContext.delete
- reflexContext.deleteFolder
- reflexContext.doResponse
- reflexContext.doResponseCsv
- reflexContext.doResponseHtml
- reflexContext.fetch
- reflexContext.getContent
- reflexContext.getContentType
- reflexContext.getCookies
- reflexContext.getCsv
- reflexContext.getEntry
- reflexContext.getFeed
- reflexContext.getHeaders
- reflexContext.getHtml
- reflexContext.getMail
- reflexContext.getPathinfo
- reflexContext.getQueryString
- reflexContext.getRequest
- reflexContext.getSettingValue
- reflexContext.getStatus
- reflexContext.getUriAndQuerystring
- reflexContext.httpmethod
- reflexContext.log
- reflexContext.post
- reflexContext.put
- reflexContext.rangeids
- reflexContext.RXID
- reflexContext.saveFiles
- reflexContext.sendError
- reflexContext.sendMessage
- reflexContext.sendRedirect
- reflexContext.setHeader
- reflexContext.setids
- reflexContext.setStatus
- reflexContext.toPdf
- reflexContext.toXls
- reflexContext.uid
Methods
(static) addids(url, num) → {feed}
Adds the num value to the ids(numbering data) with the specified url.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | url |
num |
number | number of additions |
Returns:
- feed.title in results.
- Type
- feed
(static) allocids(url, num) → {feed}
Allocate the num value to the ids(numbering data) with the specified url.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | url |
num |
number | number to allocate |
Returns:
- feed.title in results.
- Type
- feed
(static) count(url) → {number}
Returns the number of entry to the client by the specified url.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | url |
Returns:
- results
- Type
- number
(static) delete(url) → {feed}
Deletes the entry data with the specified url.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | url |
Returns:
result
- Type
- feed
(static) deleteFolder(url) → {feed}
Deletes the folder entry and descendants with the specified url.
Parameters:
Name | Type | Description |
---|---|---|
url |
string |
Returns:
feed
- Type
- feed
(static) doResponse(feed, status_code)
Returns the feed to the client by the specified feed and status_code.
Parameters:
Name | Type | Description |
---|---|---|
feed |
feed | feed to respond |
status_code |
int | http status code |
(static) doResponseCsv(value, filename)
Returns the csv data to the client using the specified value and filename.
Parameters:
Name | Type | Description |
---|---|---|
value |
Array.<string> | csv rows |
filename |
string | output file's name |
(static) doResponseHtml(html)
Sends an content to the client using the specified html.
Parameters:
Name | Type | Description |
---|---|---|
html |
string | output html contents |
(static) fetch(url, init)
fetch provides an interface for fetching resources. Same as Fetch API if used locally.
See : https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
See : https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
url |
string | target url | |||||||||
init |
init | init parameter object
Properties
|
(static) getContent(url) → {string}
Gets the content by the specified url.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | url |
Returns:
- content
- Type
- string
(static) getContentType() → {string}
Gets the content type for this response.
Returns:
- content type
- Type
- string
(static) getCookies() → {feed}
Gets the cookies for this request.
Returns:
- cookies
- Type
- feed
(static) getCsv(header, items, parent, skip, encoding) → {feed}
Convert the csv data to the feed.
Parameters:
Name | Type | Description |
---|---|---|
header |
Array.<string> | csv header |
items |
Array.<string> | csv items |
parent |
string | parent item(e.g.'entry') |
skip |
number | number to skip rows |
encoding |
string | encoding type |
Returns:
- results
- Type
- feed
(static) getEntry(url) → {entry}
Returns the response entry to the client by the specified url.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | url |
Returns:
- entry
- Type
- entry
(static) getFeed(url) → {feed}
Returns the response feed to the client by the specified url.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | url |
Returns:
- feed
- Type
- feed
(static) getHeaders() → {feed}
Gets the headers for this request.
Returns:
- headers
- Type
- feed
(static) getHtml(url) → {string}
Gets the html content by the specified url.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | url |
Returns:
- html content
- Type
- string
(static) getMail(settings) → {feed}
Gets the mail messages by the specified settings.
Parameters:
Name | Type | Description |
---|---|---|
settings |
settings | mail settings |
Returns:
- results
- Type
- feed
(static) getPathinfo() → {string}
Returns any extra path information associated with the URL the client sent when it made this request.
Returns:
- pathinfo
- Type
- string
(static) getQueryString(paramopt) → {string}
Returns the query string that is contained in the request URL after the path.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
param |
string |
<optional> |
query parameter |
Returns:
- query string
- Type
- string
(static) getRequest() → {feed}
Gets the feed data for this request.
Returns:
- request data
- Type
- feed
(static) getSettingValue() → {string}
Gets the setting value of the service(/_settings/properties) by the specified key.
Returns:
- setting value
- Type
- string
(static) getStatus() → {number}
Gets the status code for this response.
Returns:
- http status code
- Type
- number
(static) getUriAndQuerystring() → {string}
Returns the URL path and the query string.
Returns:
- the URL path and the query string.
- Type
- string
(static) httpmethod() → {string}
Gets the http method for this request.
Returns:
- httpmethod
- Type
- string
(static) log(message, titleopt, subtitleopt)
Outputs a message to the Admin Console.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
message |
string | message to output | |
title |
string |
<optional> |
title |
subtitle |
string |
<optional> |
subtitle |
(static) post(request, url, force) → {feed}
Posts the request feed to the server with the specified url.
Parameters:
Name | Type | Description |
---|---|---|
request |
feed | request feed |
url |
string | url |
force |
boolean | Forcibly execute even if it exceeds the upper limit of entries of request feed. |
Returns:
- result
- Type
- feed
(static) put(request, force) → {feed}
Puts the request feed to the server.
Parameters:
Name | Type | Description |
---|---|---|
request |
feed | request feed |
force |
boolean | Forcibly execute even if it exceeds the upper limit of entries of request feed. |
Returns:
result
- Type
- feed
(static) rangeids(url, range)
Sets the range of the ids(numbering data) with the specified url.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | url |
range |
string | range |
(static) RXID() → {string}
Gets the RXID
Returns:
- RXID
- Type
- string
(static) saveFiles(props)
Saves the files to the server with the specified props. This method is used simultaneously with file uploading.
Parameters:
Name | Type | Description |
---|---|---|
props |
props | save files info. |
(static) sendError(status_code, messageopt)
Sends an error response to the client using the specified status.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
status_code |
number | http status code | |
message |
string |
<optional> |
message to send |
(static) sendMessage(status_code, message)
Sends an feed response(including message) to the client using the specified status.
Parameters:
Name | Type | Description |
---|---|---|
status_code |
number | http status code |
message |
string | message to send |
(static) sendRedirect(location)
Sends a temporary redirect response to the client using the specified redirect location URL.
Parameters:
Name | Type | Description |
---|---|---|
location |
string | redirect url |
(static) setHeader(name, value)
Sets a response header with the given name and value.
Parameters:
Name | Type | Description |
---|---|---|
name |
string | header's name |
value |
string | header's value |
(static) setids(url, num)
Sets the value to the ids(numbering data) with the specified url.
Parameters:
Name | Type | Description |
---|---|---|
url |
string | url |
num |
number | value to set |
(static) setStatus(status_code)
Sets the status code for this response.
Parameters:
Name | Type | Description |
---|---|---|
status_code |
number | http status code |
(static) toPdf(data, html, outfilename, baseurlopt)
Convert to PDF and sends it to the client using the specified data and html.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
data |
feed | data | |
html |
string | html template | |
outfilename |
string | output filename | |
baseurl |
string |
<optional> |
base PDF's url |
(static) toXls(data, inputxls, outfilename)
Convert to Xls and sends it to the client using the specified data and inputxls.
Parameters:
Name | Type | Description |
---|---|---|
data |
feed | data |
inputxls |
string | xls template |
outfilename |
string | output filename |
(static) uid() → {string}
Gets the uid for this request. uid is a login user-specific code.
Returns:
- uid
- Type
- string