Class HttpServer
Class defined in:src/node-httpserver.js:40
SAGE HTTP request handlers for GET and POST
HttpServer
( publicDirectory
)
src/node-httpserver.js:40
Parameters:
-
publicDirectory
<String>folder to expose to the server
Object
buildHeader
(
)
src/node-httpserver.js:144
Build an HTTP header object
Returns: <Object>
an object containig common HTTP header values
Object
detectCookies
( request
)
src/node-httpserver.js:58
Given a request, will attempt to detect all associated cookies.
Parameters:-
request
<Object>the request that came from a client
Returns: <Object>
containing the list of cookies in string format
httpGET
( name, callback
)
src/node-httpserver.js:570
Add a HTTP GET handler (i.e. route)
Parameters:httpPOST
( name, callback
)
src/node-httpserver.js:581
Add a HTTP POST handler (i.e. route)
Parameters:notfound
( res
)
src/node-httpserver.js:82
Handle a page not found (404)
Parameters:-
res
<Object>response
onreq
( req, res
)
src/node-httpserver.js:241
Main router and trigger the GET and POST handlers
Parameters: