UNPKG

sgapps-server

Version:
2,490 lines (657 loc) 44.7 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>SGAppsServerRequest - SGApps Server - Framework</title> <meta name="description" content="SGApps Server for high performance results" /> <meta name="keywords" content="javascript, js, application-prototype, prototype" /> <meta name="keyword" content="javascript, js, application-prototype, prototype" /> <meta property="og:title" content="SGApps Server - Framework"/> <meta property="og:type" content="website"/> <meta property="og:image" content=""/> <meta property="og:url" content="https://labs.sgapps.io/open-source/sgapps-server"/> <script src="scripts/prettify/prettify.js"></script> <script src="scripts/prettify/lang-css.js"></script> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/prettify.css"> <link type="text/css" rel="stylesheet" href="styles/jsdoc.css"> <script src="scripts/nav.js" defer></script> <meta name="viewport" content="width=device-width, initial-scale=1.0"> </head> <body> <input type="checkbox" id="nav-trigger" class="nav-trigger" /> <label for="nav-trigger" class="navicon-button x"> <div class="navicon"></div> </label> <label for="nav-trigger" class="overlay"></label> <nav class="wrap"> <input type="text" id="nav-search" placeholder="Search" /> <h2><a href="index.html">Home</a></h2><h2><a href="https://labs.sgapps.io/open-source/sgapps-server" target="_blank" class="menu-item" id="website_link" >Project Page ( Git Lab )</a></h2><h2><a href="http://gordienco.net/" target="_blank" class="menu-item" id="website_link" >About Me</a></h2><h2><a href="https://labs.sgapps.io/open-source/sgapps-server" target="_blank" class="menu-item" id="github_link" >GitHub</a></h2><h3>Classes</h3><ul><li><a href="AccessLogger.html">AccessLogger</a><ul class='methods'><li data-type='method' style='display: none;'><a href="AccessLogger.html#formattedDate">formattedDate</a></li><li data-type='method' style='display: none;'><a href="AccessLogger.html#getProtocol">getProtocol</a></li><li data-type='method' style='display: none;'><a href="AccessLogger.html#getReferer">getReferer</a></li><li data-type='method' style='display: none;'><a href="AccessLogger.html#getRemoteIp">getRemoteIp</a></li><li data-type='method' style='display: none;'><a href="AccessLogger.html#getSize">getSize</a></li><li data-type='method' style='display: none;'><a href="AccessLogger.html#getUsername">getUsername</a></li><li data-type='method' style='display: none;'><a href="AccessLogger.html#logRequest">logRequest</a></li></ul></li><li><a href="FaceboxTemplate.html">FaceboxTemplate</a><ul class='methods'><li data-type='method' style='display: none;'><a href="FaceboxTemplate.html#render">render</a></li><li data-type='method' style='display: none;'><a href="FaceboxTemplate.html#renderCode">renderCode</a></li><li data-type='method' style='display: none;'><a href="FaceboxTemplate.html#renderFile">renderFile</a></li></ul></li><li><a href="FSLibrary.html">FSLibrary</a></li><li><a href="LoggerBuilder.html">LoggerBuilder</a><ul class='methods'><li data-type='method' style='display: none;'><a href="LoggerBuilder.html#decorateGlobalLogger">decorateGlobalLogger</a></li><li data-type='method' style='display: none;'><a href="LoggerBuilder.html#error">error</a></li><li data-type='method' style='display: none;'><a href="LoggerBuilder.html#info">info</a></li><li data-type='method' style='display: none;'><a href="LoggerBuilder.html#log">log</a></li><li data-type='method' style='display: none;'><a href="LoggerBuilder.html#prettyCli">prettyCli</a></li><li data-type='method' style='display: none;'><a href="LoggerBuilder.html#prompt">prompt</a></li><li data-type='method' style='display: none;'><a href="LoggerBuilder.html#warn">warn</a></li></ul></li><li><a href="SGAppsServer.html">SGAppsServer</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServer.html#all">all</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#connect">connect</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#delete">delete</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#Email">Email</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#finalHandler">finalHandler</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#get">get</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#handle">handle</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#handleErrorRequest">handleErrorRequest</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#handlePostData">handlePostData</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#handleRequest">handleRequest</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#handleStaticRequest">handleStaticRequest</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#head">head</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#options">options</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#patch">patch</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#post">post</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#put">put</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#server">server</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#trace">trace</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.html#use">use</a></li></ul></li><li><a href="SGAppsServer.NodeJsMvc.html">NodeJsMvc</a></li><li class="level-hide"><a href="SGAppsServer.NodeJsMvc.Controller.html">Controller</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#actionExists">actionExists</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#addAction">addAction</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#addView">addView</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#getAction">getAction</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#getView">getView</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#removeAction">removeAction</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#removeView">removeView</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#render">render</a></li><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.html#viewExists">viewExists</a></li></ul></li><li class="level-hide"><a href="SGAppsServer.NodeJsMvc.Controller.Action.html">Action</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServer.NodeJsMvc.Controller.Action.html#run">run</a></li></ul></li><li><a href="SGAppsServerDecoratorsLibrary.html">SGAppsServerDecoratorsLibrary</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServerDecoratorsLibrary.html#.AccessLoggerDecorator">AccessLoggerDecorator</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerDecoratorsLibrary.html#.NodeJsMvcDecorator">NodeJsMvcDecorator</a></li></ul></li><li><a href="SGAppsServerDictionary.html">SGAppsServerDictionary</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServerDictionary.html#generatePathKey">generatePathKey</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerDictionary.html#push">push</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerDictionary.html#run">run</a></li></ul></li><li><a href="SGAppsServerEmail.html">SGAppsServerEmail</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServerEmail.html#.from">from</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerEmail.html#.isValidAddress">isValidAddress</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerEmail.html#.timeout">timeout</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerEmail.html#send">send</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerEmail.html#valid">valid</a></li></ul></li><li><a href="SGAppsServerRequest.html">SGAppsServerRequest</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServerRequest.html#_parseDeepFieldName">_parseDeepFieldName</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerRequest.html#getMountUpdatedUrl">getMountUpdatedUrl</a></li></ul></li><li><a href="SGAppsServerRequestCookie.html">SGAppsServerRequestCookie</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServerRequestCookie.html#get">get</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerRequestCookie.html#set">set</a></li></ul></li><li><a href="SGAppsServerRequestSession.html">SGAppsServerRequestSession</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServerRequestSession.html#destroy">destroy</a></li></ul></li><li><a href="SGAppsServerResponse.html">SGAppsServerResponse</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsServerResponse.html#pipeFile">pipeFile</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerResponse.html#pipeFileStatic">pipeFileStatic</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerResponse.html#redirect">redirect</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerResponse.html#send">send</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerResponse.html#sendError">sendError</a></li><li data-type='method' style='display: none;'><a href="SGAppsServerResponse.html#sendStatusCode">sendStatusCode</a></li></ul></li><li><a href="SGAppsServerShared.html">SGAppsServerShared</a></li><li><a href="SGAppsSessionManager.html">SGAppsSessionManager</a><ul class='methods'><li data-type='method' style='display: none;'><a href="SGAppsSessionManager.html#handleRequest">handleRequest</a></li><li data-type='method' style='display: none;'><a href="SGAppsSessionManager.html#removeExpiredSessions">removeExpiredSessions</a></li></ul></li><li><a href="TemplateManager.html">TemplateManager</a><ul class='methods'><li data-type='method' style='display: none;'><a href="TemplateManager.html#add">add</a></li><li data-type='method' style='display: none;'><a href="TemplateManager.html#addList">addList</a></li><li data-type='method' style='display: none;'><a href="TemplateManager.html#get">get</a></li><li data-type='method' style='display: none;'><a href="TemplateManager.html#remove">remove</a></li><li data-type='method' style='display: none;'><a href="TemplateManager.html#render">render</a></li><li data-type='method' style='display: none;'><a href="TemplateManager.html#templateExists">templateExists</a></li></ul></li><li><a href="TemplateManagerViewer.html">TemplateManagerViewer</a><ul class='methods'><li data-type='method' style='display: none;'><a href="TemplateManagerViewer.html#render">render</a></li><li data-type='method' style='display: none;'><a href="TemplateManagerViewer.html#renderCode">renderCode</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#LoggerBuilderPrompt">LoggerBuilderPrompt</a></li><li><a href="global.html#MountUpdatedURL">MountUpdatedURL</a></li><li><a href="global.html#RequestHandler">RequestHandler</a></li><li><a href="global.html#RequestPathStructure">RequestPathStructure</a></li><li><a href="global.html#RequestPathStructureMap">RequestPathStructureMap</a></li><li><a href="global.html#RequestSessionDecorator">RequestSessionDecorator</a></li><li><a href="global.html#ResourcesExtensions">ResourcesExtensions</a></li><li><a href="global.html#routeMatch">routeMatch</a></li><li><a href="global.html#SGAppsServerDecorator">SGAppsServerDecorator</a></li><li><a href="global.html#SGAppsServerDictionaryRunCallBack">SGAppsServerDictionaryRunCallBack</a></li><li><a href="global.html#SGAppsServerErrorCallBack">SGAppsServerErrorCallBack</a></li><li><a href="global.html#SGAppsServerErrorOnlyCallback">SGAppsServerErrorOnlyCallback</a></li><li><a href="global.html#SGAppsServerHandlerPostData">SGAppsServerHandlerPostData</a></li><li><a href="global.html#SGAppsServerOptions">SGAppsServerOptions</a></li><li><a href="global.html#SGAppsServerRequestFile">SGAppsServerRequestFile</a></li><li><a href="global.html#SGAppsServerRequestPostDataItem">SGAppsServerRequestPostDataItem</a></li><li><a href="global.html#SGAppsServerRequestSessionCache">SGAppsServerRequestSessionCache</a></li><li><a href="global.html#SGAppsSessionManagerOptions">SGAppsSessionManagerOptions</a></li><li><a href="global.html#TemplateManagerRenderOptions">TemplateManagerRenderOptions</a></li><li><a href="global.html#TemplateManagerTemplate">TemplateManagerTemplate</a></li></ul> </nav> <div id="main"> <h1 class="page-title">SGAppsServerRequest</h1> <section> <header> <h2> SGAppsServerRequest </h2> </header> <article> <div class="container-overview"> <h4 class="name" id="SGAppsServerRequest"><span class="type-signature"></span>new SGAppsServerRequest<span class="signature">(request, server)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_request.js.html">prototypes/server/request.js</a>, <a href="prototypes_server_request.js.html#line3">line 3</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>request</code></td> <td class="type"> <span class="param-type">IncomingMessage</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>server</code></td> <td class="type"> <span class="param-type"><a href="SGAppsServer.html">SGAppsServer</a></span> </td> <td class="description last"></td> </tr> </tbody> </table> </div> <h3 class="subsection-title">Members</h3> <h4 class="name" id="_destroy"><span class="type-signature"></span>_destroy<span class="type-signature"> :Array.&lt;function()></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_request.js.html">prototypes/server/request.js</a>, <a href="prototypes_server_request.js.html#line98">line 98</a> </li></ul></dd> </dl> <div class="description usertext"> <p>Array of functions to be called on response end</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Array.&lt;function()></span> </li> </ul> <h4 class="name" id="_flags"><span class="type-signature"></span>_flags<span class="type-signature"> :object</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_request.js.html">prototypes/server/request.js</a>, <a href="prototypes_server_request.js.html#line121">line 121</a> </li></ul></dd> </dl> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>complete</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> </td> <td class="description last"><p>The message.complete property will be true if a complete HTTP message has been received and successfully parsed.</p></td> </tr> <tr> <td class="name"><code>aborted</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> </td> <td class="description last"><p>The message.aborted property will be true if the request has been aborted.</p></td> </tr> <tr> <td class="name"><code>closed</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> </td> <td class="description last"><p>Indicates that the underlying connection was closed.</p></td> </tr> <tr> <td class="name"><code>_DEBUG_MAX_HANDLER_EXECUTION_TIME</code></td> <td class="type"> <span class="param-type">number</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"><p>define a bigger request timeout</p></td> </tr> </tbody> </table> <div class="description usertext"> <p>Array of functions to be called on response end</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">object</span> </li> </ul> <h4 class="name" id="_postDataBuffer"><span class="type-signature"></span>_postDataBuffer<span class="type-signature"> :Buffer</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_extend_request-postdata.js.html">prototypes/server/extend/request-postdata.js</a>, <a href="prototypes_server_extend_request-postdata.js.html#line20">line 20</a> </li></ul></dd> </dl> <div class="description usertext"> <p>post data buffer cache</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Buffer</span> </li> </ul> <h4 class="name" id="AccessLoggerPaths"><span class="type-signature"></span>AccessLoggerPaths<span class="type-signature"> :Object.&lt;string, <a href="AccessLogger.html#.AccessLoggerPath">AccessLogger.AccessLoggerPath</a>></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="decorators_access-logger.js.html">decorators/access-logger.js</a>, <a href="decorators_access-logger.js.html#line362">line 362</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">Object.&lt;string, <a href="AccessLogger.html#.AccessLoggerPath">AccessLogger.AccessLoggerPath</a>></span> </li> </ul> <h4 class="name" id="body"><span class="type-signature"></span>body<span class="type-signature"> :object</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_extend_request-postdata.js.html">prototypes/server/extend/request-postdata.js</a>, <a href="prototypes_server_extend_request-postdata.js.html#line55">line 55</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">object</span> </li> </ul> <h4 class="name" id="bodyItems"><span class="type-signature"></span>bodyItems<span class="type-signature"> :Array.&lt;<a href="global.html#SGAppsServerRequestPostDataItem">SGAppsServerRequestPostDataItem</a>></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_extend_request-postdata.js.html">prototypes/server/extend/request-postdata.js</a>, <a href="prototypes_server_extend_request-postdata.js.html#line67">line 67</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">Array.&lt;<a href="global.html#SGAppsServerRequestPostDataItem">SGAppsServerRequestPostDataItem</a>></span> </li> </ul> <h4 class="name" id="cookies"><span class="type-signature"></span>cookies<span class="type-signature"> :<a href="SGAppsServerRequestCookie.html">SGAppsServerRequestCookie</a></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_extend_request-cookie.js.html">prototypes/server/extend/request-cookie.js</a>, <a href="prototypes_server_extend_request-cookie.js.html#line75">line 75</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="SGAppsServerRequestCookie.html">SGAppsServerRequestCookie</a></span> </li> </ul> <h4 class="name" id="fileItems"><span class="type-signature"></span>fileItems<span class="type-signature"> :Array.&lt;<a href="global.html#SGAppsServerRequestFile">SGAppsServerRequestFile</a>></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_extend_request-postdata.js.html">prototypes/server/extend/request-postdata.js</a>, <a href="prototypes_server_extend_request-postdata.js.html#line93">line 93</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">Array.&lt;<a href="global.html#SGAppsServerRequestFile">SGAppsServerRequestFile</a>></span> </li> </ul> <h4 class="name" id="files"><span class="type-signature"></span>files<span class="type-signature"> :Object.&lt;string, Array.&lt;<a href="global.html#SGAppsServerRequestFile">SGAppsServerRequestFile</a>>></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_extend_request-postdata.js.html">prototypes/server/extend/request-postdata.js</a>, <a href="prototypes_server_extend_request-postdata.js.html#line79">line 79</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">Object.&lt;string, Array.&lt;<a href="global.html#SGAppsServerRequestFile">SGAppsServerRequestFile</a>>></span> </li> </ul> <h4 class="name" id="MAX_POST_SIZE"><span class="type-signature"></span>MAX_POST_SIZE<span class="type-signature"> :number</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_request.js.html">prototypes/server/request.js</a>, <a href="prototypes_server_request.js.html#line70">line 70</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">number</span> </li> </ul> <h5>Examples</h5> <pre class="prettyprint"><code>// changing max post size to 4Mb request.MAX_POST_SIZE = 4 * 1024 * 1024;</code></pre> <pre class="prettyprint"><code>// reset max post size to global value request.MAX_POST_SIZE = -1;</code></pre> <h4 class="name" id="mountPath"><span class="type-signature"></span>mountPath<span class="type-signature"> :string</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_request.js.html">prototypes/server/request.js</a>, <a href="prototypes_server_request.js.html#line54">line 54</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">string</span> </li> </ul> <h4 class="name" id="params"><span class="type-signature"></span>params<span class="type-signature"> :<a href="SGAppsServerRequest.html#.RequestParams">SGAppsServerRequest.RequestParams</a></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_request.js.html">prototypes/server/request.js</a>, <a href="prototypes_server_request.js.html#line112">line 112</a> </li></ul></dd> </dl> <div class="description usertext"> <p>Array of functions to be called on response end</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="SGAppsServerRequest.html#.RequestParams">SGAppsServerRequest.RequestParams</a></span> </li> </ul> <h4 class="name" id="postData"><span class="type-signature"></span>postData<span class="type-signature"> :Promise.&lt;Buffer></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_extend_request-postdata.js.html">prototypes/server/extend/request-postdata.js</a>, <a href="prototypes_server_extend_request-postdata.js.html#line352">line 352</a> </li></ul></dd> </dl> <div class="description usertext"> <p>request's post received data</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Promise.&lt;Buffer></span> </li> </ul> <h4 class="name" id="query"><span class="type-signature"></span>query<span class="type-signature"> :object</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_request.js.html">prototypes/server/request.js</a>, <a href="prototypes_server_request.js.html#line42">line 42</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">object</span> </li> </ul> <h4 class="name" id="request"><span class="type-signature"></span>request<span class="type-signature"> :IncomingMessage</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_request.js.html">prototypes/server/request.js</a>, <a href="prototypes_server_request.js.html#line10">line 10</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">IncomingMessage</span> </li> </ul> <h4 class="name" id="session"><span class="type-signature"></span>session<span class="type-signature"> :<a href="SGAppsServerRequestSession.html">SGAppsServerRequestSession</a></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_extend_request-session.js.html">prototypes/server/extend/request-session.js</a>, <a href="prototypes_server_extend_request-session.js.html#line311">line 311</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="SGAppsServerRequestSession.html">SGAppsServerRequestSession</a></span> </li> </ul> <h4 class="name" id="urlInfo"><span class="type-signature"></span>urlInfo<span class="type-signature"> :object</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_request.js.html">prototypes/server/request.js</a>, <a href="prototypes_server_request.js.html#line20">line 20</a> </li></ul></dd> </dl> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>original</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>origin</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>domain</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>full domain of url</p></td> </tr> <tr> <td class="name"><code>domain_short</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>domain without &quot;www.&quot;</p></td> </tr> <tr> <td class="name"><code>pathname</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>url's pathname</p></td> </tr> <tr> <td class="name"><code>reqQuery</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>url's query from '?'</p></td> </tr> <tr> <td class="name"><code>protocol</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>url.split('://')[0]</p></td> </tr> <tr> <td class="name"><code>url</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>url_p</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>isIp</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>domain or Ip</p></td> </tr> </tbody> </table> <h5>Type:</h5> <ul> <li> <span class="param-type">object</span> </li> </ul> <h3 class="subsection-title">Methods</h3> <h4 class="name" id="_parseDeepFieldName"><span class="type-signature"></span>_parseDeepFieldName<span class="signature">(container, fieldName, fieldData, options<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_extend_request-postdata.js.html">prototypes/server/extend/request-postdata.js</a>, <a href="prototypes_server_extend_request-postdata.js.html#line106">line 106</a> </li></ul></dd> </dl> <div class="description usertext"> <p>Automatically used procedure for parsing formData field name if option <code>server._options._REQUEST_FORM_PARAMS_DEEP_PARSE = true</code>. it's by default enabled but can be disabled when needed</p> </div> <h5>Examples</h5> <pre class="prettyprint"><code>paramsContainer = {}; request._parseDeepFieldName(paramsContainer, 'test[arr][data]', 2); request._parseDeepFieldName(paramsContainer, 'test[arr][]', new Date()); request._parseDeepFieldName(paramsContainer, 'test[arr][]', 2); request._parseDeepFieldName(paramsContainer, 'test[data]', 2); // if _debug enabled warns will be emitted // [Warn] [Request._parseDeepFieldName] Writing Array field "test[arr][]" into a object // [Warn] [Request._parseDeepFieldName] Overwriting field "test[data]" value console.log(paramsContainer) { "test": { "arr": { "1": "2021-02-12T21:23:01.913Z", "2": 2, "data": 2 }, "data": 2 } }</code></pre> <pre class="prettyprint"><code>paramsContainer = {}; request._parseDeepFieldName(paramsContainer, 'test[arr][]', new Date()); request._parseDeepFieldName(paramsContainer, 'test[arr][]', 2); request._parseDeepFieldName(paramsContainer, 'test[arr][data]', 2); request._parseDeepFieldName(paramsContainer, 'test[data]', 2); // if _debug enabled warns will be emitted // [Warn] [Request._parseDeepFieldName] Converting array to object due incorrect field "test[arr][data]" name console.log(paramsContainer) { "test": { "arr": { "0": "2021-02-12T21:34:47.359Z", "1": 2, "data": 2 }, "data": 2 } }</code></pre> <pre class="prettyprint"><code>paramsContainer = {}; request._parseDeepFieldName(paramsContainer, 'test[arr][]', new Date()); request._parseDeepFieldName(paramsContainer, 'test[arr][]', 2); request._parseDeepFieldName(paramsContainer, 'test[data]', 2); console.log(paramsContainer) { "test": { "arr": [ "2021-02-12T21:26:43.766Z", 2 ], "data": 2 } }</code></pre> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>container</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>fieldName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="attributes"> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>fieldData</code></td> <td class="type"> <span class="param-type">any</span> </td> <td class="attributes"> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>options</code></td> <td class="type"> <span class="param-type">object</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="description last"> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th>Attributes</th> <th>Default</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>transform2ArrayOnDuplicate</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="attributes"> &lt;optional><br> </td> <td class="default"> <code>false</code> </td> <td class="description last"></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <h4 class="name" id="getMountUpdatedUrl"><span class="type-signature"></span>getMountUpdatedUrl<span class="signature">(url)</span><span class="type-signature"> &rarr; {<a href="global.html#MountUpdatedURL">MountUpdatedURL</a>}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_extend_request-url.js.html">prototypes/server/extend/request-url.js</a>, <a href="prototypes_server_extend_request-url.js.html#line20">line 20</a> </li></ul></dd> </dl> <h5>Parameters:</h5> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>url</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"></td> </tr> </tbody> </table> <h5>Returns:</h5> <dl class="param-type"> <dt> Type </dt> <dd> <span class="param-type"><a href="global.html#MountUpdatedURL">MountUpdatedURL</a></span> </dd> </dl> <h3 class="subsection-title">Type Definitions</h3> <h4 class="name" id=".RequestParams">RequestParams</h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="prototypes_server_request.js.html">prototypes/server/request.js</a>, <a href="prototypes_server_request.js.html#line107">line 107</a> </li></ul></dd> </dl> <h5>Type:</h5> <ul> <li> <span class="param-type">Object.&lt;(string|number), string></span> | <span class="param-type">Array.&lt;string></span> </li> </ul> </article> </section> </div> <br class="clear"> <footer> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.5</a> using the <a href="https://github.com/clenemt/docdash">docdash</a> theme. </footer> <script>prettyPrint();</script> <script src="scripts/polyfill.js"></script> <script src="scripts/linenumber.js"></script> <script src="scripts/search.js" defer></script> <script src="scripts/collapse.js" defer></script> <script src="https://sgapps.io/components/sgapps-labs-examples/toolbar/loader.js"></script> </body> </html>