mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-02-02 22:35:55 +01:00
Added method and property descriptions for WebServerRequest's docs.
This commit is contained in:
parent
b095a48ace
commit
1e604b13fb
@ -15,113 +15,135 @@
|
|||||||
<method name="can_create" qualifiers="const">
|
<method name="can_create" qualifiers="const">
|
||||||
<return type="bool" />
|
<return type="bool" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns true if the active [WebPermission] has create permission for this session. It you don't have a [WebPermission] set, all perissions are enabled for every user.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="can_delete" qualifiers="const">
|
<method name="can_delete" qualifiers="const">
|
||||||
<return type="bool" />
|
<return type="bool" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns true if the active [WebPermission] has delete permission for this session. It you don't have a [WebPermission] set, all perissions are enabled for every user.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="can_edit" qualifiers="const">
|
<method name="can_edit" qualifiers="const">
|
||||||
<return type="bool" />
|
<return type="bool" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns true if the active [WebPermission] has edit permission for this session. It you don't have a [WebPermission] set, all perissions are enabled for every user.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="can_view" qualifiers="const">
|
<method name="can_view" qualifiers="const">
|
||||||
<return type="bool" />
|
<return type="bool" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns true if the active [WebPermission] has view permission for this session. It you don't have a [WebPermission] set, all perissions are enabled for every user.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="compile_and_send_body">
|
<method name="compile_and_send_body">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<description>
|
<description>
|
||||||
|
Calls [code]compile_body()[/code], and then [code]send()[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="compile_body">
|
<method name="compile_body">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<description>
|
<description>
|
||||||
|
Takes the head, body and footer properties, and merges them into the [code]compiled_body[/code] property. It adds an html5 type declaration, then the opening [code]html[/code] tag, then the contents of the [code]head[/code] property to the [code]head[/code] section of the response, and then the contents of the [code]body[/code] then footer property into the [code]body[/code] section of the response, then it closes the main [code]html[/code] tag.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_cookie">
|
<method name="get_cookie">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<argument index="0" name="key" type="String" />
|
<argument index="0" name="key" type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the value of the cookie [code]key[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_csrf_token">
|
<method name="get_csrf_token">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
A helper method that tries to get the value of the [code]csrf_token[/code] key from the [HTTPSession] set into the [code]session[/code] property.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_current_path_segment" qualifiers="const">
|
<method name="get_current_path_segment" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the currently active path segment. For example if you have [code]http://127.0.0.1/a/b/c[/code], and the current path segment is [code]b[/code], then this will return [code]b[/code].
|
||||||
|
If you reach the end, it will return [code]/[/code]! For example if you have [code]http://127.0.0.1/a/b/c[/code], and the current path segment reached beyond [code]c[/code] (we are at the [WebNode] that has it's [code]uri_segment[/code] set to [code]c[/code]), then this will return [code]/[/code]. Actually this is how [WebNode]s check whether they need to handle a request themselves or not ([code]if request.get_current_path_segment() == "/": handle_request(request)[/code]).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_current_segment_index" qualifiers="const">
|
<method name="get_current_segment_index" qualifiers="const">
|
||||||
<return type="int" />
|
<return type="int" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the index of the currently active path segment. For example if you have [code]http://127.0.0.1/a/b/c[/code], and the current path segment is [code]b[/code], then this will return 1.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_file_count" qualifiers="const">
|
<method name="get_file_count" qualifiers="const">
|
||||||
<return type="int" />
|
<return type="int" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns how many files were in the http request. Note that only multipart forms can contain files.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_file_data" qualifiers="const">
|
<method name="get_file_data" qualifiers="const">
|
||||||
<return type="PoolByteArray" />
|
<return type="PoolByteArray" />
|
||||||
<argument index="0" name="arg0" type="int" />
|
<argument index="0" name="arg0" type="int" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the file as a PoolByteArray.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_file_data_str" qualifiers="const">
|
<method name="get_file_data_str" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<argument index="0" name="arg0" type="int" />
|
<argument index="0" name="arg0" type="int" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the file as a String.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_file_file_name" qualifiers="const">
|
<method name="get_file_file_name" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<argument index="0" name="index" type="int" />
|
<argument index="0" name="index" type="int" />
|
||||||
<description>
|
<description>
|
||||||
|
Return the file's name that was present in the form itself.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_file_key" qualifiers="const">
|
<method name="get_file_key" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<argument index="0" name="index" type="int" />
|
<argument index="0" name="index" type="int" />
|
||||||
<description>
|
<description>
|
||||||
|
Same as get_file_file_name at the moment.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_file_length" qualifiers="const">
|
<method name="get_file_length" qualifiers="const">
|
||||||
<return type="int" />
|
<return type="int" />
|
||||||
<argument index="0" name="index" type="int" />
|
<argument index="0" name="index" type="int" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the file's length.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_host" qualifiers="const">
|
<method name="get_host" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the host which was present in the request header.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_method" qualifiers="const">
|
<method name="get_method" qualifiers="const">
|
||||||
<return type="int" enum="HTTPServerEnums.HTTPMethod" />
|
<return type="int" enum="HTTPServerEnums.HTTPMethod" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the request's method.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_next_path_segment" qualifiers="const">
|
<method name="get_next_path_segment" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the next path segment. For example if you have [code]http://127.0.0.1/a/b/c[/code], and the current path segment is [code]b[/code], then this will return [code]c[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_or_create_session">
|
<method name="get_or_create_session">
|
||||||
<return type="HTTPSession" />
|
<return type="HTTPSession" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the value of the session property if it's not null, else it will try to create one using the active [HTTPSessionManager].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_parameter" qualifiers="const">
|
<method name="get_parameter" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<argument index="0" name="key" type="String" />
|
<argument index="0" name="key" type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the value that was set in the request header for the given key, or an empty String.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_path" qualifiers="const">
|
<method name="get_path" qualifiers="const">
|
||||||
@ -129,147 +151,174 @@
|
|||||||
<argument index="0" name="beginning_slash" type="bool" default="false" />
|
<argument index="0" name="beginning_slash" type="bool" default="false" />
|
||||||
<argument index="1" name="end_slash " type="bool" default="true" />
|
<argument index="1" name="end_slash " type="bool" default="true" />
|
||||||
<description>
|
<description>
|
||||||
|
Reutrns the path of the request, from the current path segment to the end. For example if you have [code]http://127.0.0.1/a/b/c[/code], and the current segment is [code]b[/code], this will return "b/c/" using the it's default arguments.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_path_full" qualifiers="const">
|
<method name="get_path_full" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the full path of the request. For example if you have [code]http://127.0.0.1/a/b/c[/code], this will return [code]a/b/c[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_path_segment" qualifiers="const">
|
<method name="get_path_segment" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<argument index="0" name="i" type="int" />
|
<argument index="0" name="i" type="int" />
|
||||||
<description>
|
<description>
|
||||||
|
Reutrns the i-th path segment.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_path_segment_count" qualifiers="const">
|
<method name="get_path_segment_count" qualifiers="const">
|
||||||
<return type="int" />
|
<return type="int" />
|
||||||
<description>
|
<description>
|
||||||
|
Reutrns how many path segments a request has.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_remaining_segment_count" qualifiers="const">
|
<method name="get_remaining_segment_count" qualifiers="const">
|
||||||
<return type="int" />
|
<return type="int" />
|
||||||
<description>
|
<description>
|
||||||
|
Reutrns how manny segments are remaining.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_server">
|
<method name="get_server">
|
||||||
<return type="WebServer" />
|
<return type="WebServer" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the owner [WebServer].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_url_root" qualifiers="const">
|
<method name="get_url_root" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the url up to the current segment prefixed with [code]/[/code]. For example if you have [code]http://127.0.0.1/a/b/c[/code], and the current segment is [code]b[/code], this will return [code]/a/[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_url_root_add" qualifiers="const">
|
<method name="get_url_root_add" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<argument index="0" name="add" type="String" />
|
<argument index="0" name="add" type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
Equivalent to [code]get_url_root() + add[/code];
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_url_root_current" qualifiers="const">
|
<method name="get_url_root_current" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the url up to, including the current segment prefixed with [code]/[/code]. For example if you have [code]http://127.0.0.1/a/b/c[/code], and the current segment is [code]b[/code], this will return [code]/a/b/[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_url_root_parent" qualifiers="const">
|
<method name="get_url_root_parent" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<argument index="0" name="parent" type="int" default="1" />
|
<argument index="0" name="parent" type="int" default="1" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the url up to, including the current segment - parent, prefixed and postfixed with [code]/[/code]. For example if you have [code]http://127.0.0.1/a/b/c[/code], and the current segment is [code]b[/code], this will return [code]/a/[/code] using it's default arguments.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_url_root_parent_add" qualifiers="const">
|
<method name="get_url_root_parent_add" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<argument index="0" name="add" type="String" />
|
<argument index="0" name="add" type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
Equivalent to [code]get_url_root_parent() + add[/code];
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_url_site" qualifiers="const">
|
<method name="get_url_site" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the url up to, including the current segment prefixed with the host, with a [code]/[/code] at the end. For example if you have [code]http://127.0.0.1/a/b/c[/code], and the current segment is [code]b[/code], this will return [code]http://127.0.0.1/a/b/[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_url_site_add" qualifiers="const">
|
<method name="get_url_site_add" qualifiers="const">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<argument index="0" name="add" type="String" />
|
<argument index="0" name="add" type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
Equivalent to [code]get_url_site() + add[/code];
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_web_root">
|
<method name="get_web_root">
|
||||||
<return type="WebNode" />
|
<return type="WebNode" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the [WebServer]'s root [WebNode].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="has_csrf_token">
|
<method name="has_csrf_token">
|
||||||
<return type="bool" />
|
<return type="bool" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns whether the active session has a csrf token or not.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="parse_files">
|
<method name="parse_files">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<description>
|
<description>
|
||||||
|
Some WebSerber implementations might need a call to this in order to process files in multipart forms. Don't call it manually, these implementations need to call it when needed.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="parser_get_path">
|
<method name="parser_get_path">
|
||||||
<return type="String" />
|
<return type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the full http path. Mostly intended for internal use. [code]setup_url_stack()[/code] uses this.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="pop_path">
|
<method name="pop_path">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<description>
|
<description>
|
||||||
|
Moves the path stack pointer backward once. For example if you have [code]http://127.0.0.1/a/b/c[/code], and the current segment is [code]b[/code], the current segment will become [code]a[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="push_path">
|
<method name="push_path">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<description>
|
<description>
|
||||||
|
Moves the path stack pointer forward once. For example if you have [code]http://127.0.0.1/a/b/c[/code], and the current segment is [code]b[/code], the current segment will become [code]c[/code]. Note that if you have [code]http://127.0.0.1/a/b/c[/code], and the current segment is [code]c[/code], the current segment will become [code]/[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="response_add_cookie">
|
<method name="response_add_cookie">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<argument index="0" name="cookie" type="WebServerCookie" />
|
<argument index="0" name="cookie" type="WebServerCookie" />
|
||||||
<description>
|
<description>
|
||||||
|
When you eventually send the response, the [WebServerCookie] added here will be added to the message header. If you want to get the receiver to delete a particular cookie, create a [WebServerCookie], add it, and use it's helper deletion related methods, which will end up adding commands to the header when the request is sent that that should (normally) cause the client to delete cookies.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="response_get_cookie">
|
<method name="response_get_cookie">
|
||||||
<return type="WebServerCookie" />
|
<return type="WebServerCookie" />
|
||||||
<argument index="0" name="index" type="int" />
|
<argument index="0" name="index" type="int" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns a previously added [WebServerCookie]. If you want to access cookie strings that you previously sent to the client, use [code]get_cookie()[/code], this method is so that you can edit cookies before being sent further.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="response_get_cookie_count">
|
<method name="response_get_cookie_count">
|
||||||
<return type="int" />
|
<return type="int" />
|
||||||
<description>
|
<description>
|
||||||
|
Returns the [WebServerCookie] count.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="response_remove_cookie">
|
<method name="response_remove_cookie">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<argument index="0" name="index" type="int" />
|
<argument index="0" name="index" type="int" />
|
||||||
<description>
|
<description>
|
||||||
|
Removes a previously added [WebServerCookie]. If you want to remove a cookie from the client, see [code]response_add_cookie()[/code] and/or [code]response_remove_cookie_simple()[/code].
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="response_remove_cookie_simple">
|
<method name="response_remove_cookie_simple">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<argument index="0" name="key" type="String" />
|
<argument index="0" name="key" type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
Helper method that adds a [WebServerCookie], which will ask client to delete the cookie denoted by [code]key[/code] after being sent.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="send">
|
<method name="send">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<description>
|
<description>
|
||||||
|
Sends the contents of the compiled_body property as a response.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="send_error">
|
<method name="send_error">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<argument index="0" name="error_code" type="int" />
|
<argument index="0" name="error_code" type="int" />
|
||||||
<description>
|
<description>
|
||||||
|
Sends an error. The default implementation calls the [WebServer]'s root [WebNode]'s [code]handle_error_send_request()[/code] method.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="send_file">
|
<method name="send_file">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<argument index="0" name="file_path" type="String" />
|
<argument index="0" name="file_path" type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
Sends the file at the given path.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="send_redirect">
|
<method name="send_redirect">
|
||||||
@ -277,43 +326,57 @@
|
|||||||
<argument index="0" name="location" type="String" />
|
<argument index="0" name="location" type="String" />
|
||||||
<argument index="1" name="status_code " type="int" enum="HTTPServerEnums.HTTPStatusCode" />
|
<argument index="1" name="status_code " type="int" enum="HTTPServerEnums.HTTPStatusCode" />
|
||||||
<description>
|
<description>
|
||||||
|
Sends a redirect http header.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_csrf_token">
|
<method name="set_csrf_token">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<argument index="0" name="value" type="String" />
|
<argument index="0" name="value" type="String" />
|
||||||
<description>
|
<description>
|
||||||
|
Sets the pased csrf token to the active session, if there is one.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="setup_url_stack">
|
<method name="setup_url_stack">
|
||||||
<return type="void" />
|
<return type="void" />
|
||||||
<description>
|
<description>
|
||||||
|
The [WebServer] needs to call this when it finished parsing a http request header and setting up a [WebServerRequest]. It parses and sets up inbternals for the easy handling of http paths.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="validate_csrf_token">
|
<method name="validate_csrf_token">
|
||||||
<return type="bool" />
|
<return type="bool" />
|
||||||
<description>
|
<description>
|
||||||
|
A helper that validates the csrf token for you.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
<members>
|
<members>
|
||||||
<member name="active_permission" type="WebPermission" setter="set_active_permission" getter="get_active_permission">
|
<member name="active_permission" type="WebPermission" setter="set_active_permission" getter="get_active_permission">
|
||||||
|
Returns the currently active [WebPermission] or null.
|
||||||
</member>
|
</member>
|
||||||
<member name="body" type="String" setter="set_body" getter="get_body" default="""">
|
<member name="body" type="String" setter="set_body" getter="get_body" default="""">
|
||||||
|
When you call [code]compile_body()[/code] or [code]compile_and_send_body()[/code], the contents of this property will end up in the [code]body[/code] portion of the resulting HTML.
|
||||||
</member>
|
</member>
|
||||||
<member name="compiled_body" type="String" setter="set_compiled_body" getter="get_compiled_body" default="""">
|
<member name="compiled_body" type="String" setter="set_compiled_body" getter="get_compiled_body" default="""">
|
||||||
|
The contents of this property will be sent as response when you call send(). Normally you should use the [code]head[/code], [code]body[/code], and [code]footer[/code] properties along with [code]compile_body()[/code] or [code]compile_and_send_body()[/code], however you can use this directly when needed.
|
||||||
</member>
|
</member>
|
||||||
<member name="connection_closed" type="bool" setter="set_connection_closed" getter="get_connection_closed" default="false">
|
<member name="connection_closed" type="bool" setter="set_connection_closed" getter="get_connection_closed" default="false">
|
||||||
|
The server might set this to true if the connection got closed while handling the request. It's not yet used.
|
||||||
</member>
|
</member>
|
||||||
<member name="footer" type="String" setter="set_footer" getter="get_footer" default="""">
|
<member name="footer" type="String" setter="set_footer" getter="get_footer" default="""">
|
||||||
|
When you call [code]compile_body()[/code] or [code]compile_and_send_body()[/code], the contents of this property will end up in the bottom of the [code]body[/code] portion of the resulting HTML.
|
||||||
</member>
|
</member>
|
||||||
<member name="head" type="String" setter="set_head" getter="get_head" default="""">
|
<member name="head" type="String" setter="set_head" getter="get_head" default="""">
|
||||||
|
When you call [code]compile_body()[/code] or [code]compile_and_send_body()[/code], the contents of this property will end up in the [code]head[/code] portion of the resulting HTML.
|
||||||
</member>
|
</member>
|
||||||
<member name="permissions" type="int" setter="set_permissions" getter="get_permissions" default="15">
|
<member name="permissions" type="int" setter="set_permissions" getter="get_permissions" default="15">
|
||||||
|
The currently active permissions. This is updated every time a new WebPermission is activated while routing.
|
||||||
</member>
|
</member>
|
||||||
<member name="session" type="HTTPSession" setter="set_session" getter="get_session">
|
<member name="session" type="HTTPSession" setter="set_session" getter="get_session">
|
||||||
|
Use this to access the active session for this [WebServerRequest].
|
||||||
|
If you want the session property to have a value, it has to be set manually somewhere along the line. Adding a [HTTPSessionManager] as a direct child of your [WebServer] and adding [SessionSetupWebServerMiddleware] to your [WebRoot] can do this for you automatically.
|
||||||
</member>
|
</member>
|
||||||
<member name="status_code" type="int" setter="set_status_code" getter="get_status_code" enum="HTTPServerEnums.HTTPStatusCode" default="200">
|
<member name="status_code" type="int" setter="set_status_code" getter="get_status_code" enum="HTTPServerEnums.HTTPStatusCode" default="200">
|
||||||
|
The status code that the server will set in the response.
|
||||||
</member>
|
</member>
|
||||||
</members>
|
</members>
|
||||||
<constants>
|
<constants>
|
||||||
|
Loading…
Reference in New Issue
Block a user