Line 6:
Line 6:
* ''bool pgAccess(string URL)'' — проверяет доступность страницы, определённой в ''URL''.
* ''bool pgAccess(string URL)'' — проверяет доступность страницы, определённой в ''URL''.
** ''URL'' — URL страницы, которая проверяется.
** ''URL'' — URL страницы, которая проверяется.
− * ''string pgCreator(string cnt, string rcode = "200 OK", string httpattrs = "Content-Type: text/html;charset={SYS}", string htmlHeadEls = "", string forceTmplFile = "")'' — формирует страницу или ресурс из содержимого ''cnt'', обёрнутого в HTTP с результатом ''rcode'', с дополнительными атрибутами HTTP ''httpattrs'', дополнительным элементом заголовка HTML ''htmlHeadEls'' и использованием файла шаблона ''forceTmplFile''.
+ * ''string pgCreator(string cnt, string rcode = "", string httpattrs = "Content-Type: text/html;charset={SYS}", string htmlHeadEls = "", string forceTmplFile = "")'' — формирует страницу или ресурс из содержимого ''cnt'', обёрнутого в HTTP с результатом ''rcode'', с дополнительными атрибутами HTTP ''httpattrs'', дополнительным элементом заголовка HTML ''htmlHeadEls'' и использованием файла шаблона ''forceTmplFile''.
** ''cnt'' — содержимое страницы или ресурса (изображения, XML, CSS, JavaScript, ...);
** ''cnt'' — содержимое страницы или ресурса (изображения, XML, CSS, JavaScript, ...);
** ''rcode'' — результирующий код HTTP, вроде "200 OK"; пустое значение выключает добавление HTTP заголовка;
** ''rcode'' — результирующий код HTTP, вроде "200 OK"; пустое значение выключает добавление HTTP заголовка;
Latest revision as of 18:04, 7 October 2024
Information about message (contribute ) This message has no documentation.
If you know where or how this message is used, you can help other translators by adding documentation to this message.
Message definition (Modules/HTTP )
== User programming API == <section begin=API /> '''Input part of the module object (SYS.Protocol.HTTP.{In})''' * ''bool setUser( string user )'' — changes the user linked to the authentication session ID. ** ''user'' — user to change. * ''bool pgAccess(string URL)'' — checks for accessing the page, pointed by the ''URL''. ** ''URL'' — URL of the checking page. * ''string pgCreator(string cnt, string rcode = "", string httpattrs = "Content-Type: text/html;charset={SYS}", string htmlHeadEls = "", string forceTmplFile = "" )'' — forms for a page or a resource from the content ''cnt'', wrapped to HTTP with the result ''rcode'', with HTTP additional attributes ''httpattrs'', HTML additional head's element ''htmlHeadEls'', forced to template file ''forceTmplFile''. ** ''cnt'' — content of the page or the resource (images, XML, CSS, JavaScript, ...) ; ** ''rcode'' — HTTP result code, like to "200 OK"; empty value there disables addition of the HTTP header; ** ''httpattrs'' — additional HTTP-attributes, mostly this is "Content-Type" which by default sets to "text/html;charset={SYS}"; only for "Content-Type: text/html" will be wrapped to internal/service or force ''forceTmplFile'' HTML-template; ** ''htmlHeadEls'' — additional HTML-header's tag, it's mostly META with "Refresh" to the specified URL; ** ''forceTmplFile'' — force template file to override the internal/service or the main-page template. <section end=API />
== User programming API ==
<section begin=API />
'''Input part of the module object (SYS.Protocol.HTTP.{In})'''
* ''bool setUser( string user )'' — changes the user linked to the authentication session ID.
** ''user'' — user to change.
* ''bool pgAccess(string URL)'' — checks for accessing the page, pointed by the ''URL''.
** ''URL'' — URL of the checking page.
* ''string pgCreator(string cnt, string rcode = "", string httpattrs = "Content-Type: text/html;charset={SYS}", string htmlHeadEls = "", string forceTmplFile = "" )'' — forms for a page or a resource from the content ''cnt'', wrapped to HTTP with the result ''rcode'', with HTTP additional attributes ''httpattrs'', HTML additional head's element ''htmlHeadEls'', forced to template file ''forceTmplFile''.
** ''cnt'' — content of the page or the resource (images, XML, CSS, JavaScript, ...) ;
** ''rcode'' — HTTP result code, like to "200 OK"; empty value there disables addition of the HTTP header;
** ''httpattrs'' — additional HTTP-attributes, mostly this is "Content-Type" which by default sets to "text/html;charset={SYS}"; only for "Content-Type: text/html" will be wrapped to internal/service or force ''forceTmplFile'' HTML-template;
** ''htmlHeadEls'' — additional HTML-header's tag, it's mostly META with "Refresh" to the specified URL;
** ''forceTmplFile'' — force template file to override the internal/service or the main-page template.
<section end=API />
Translation == API пользовательского программирования == <section begin=API /> '''Входная часть объекта модуля (SYS.Protocol.HTTP.{In})''' * ''bool setUser( string user )'' — меняет пользователя связанного с идентификатором сеанса аутентификации. ** ''user'' — пользователя для смены. * ''bool pgAccess(string URL)'' — проверяет доступность страницы, определённой в ''URL''. ** ''URL'' — URL страницы, которая проверяется. * ''string pgCreator(string cnt, string rcode = "", string httpattrs = "Content-Type: text/html;charset={SYS}", string htmlHeadEls = "", string forceTmplFile = "")'' — формирует страницу или ресурс из содержимого ''cnt'', обёрнутого в HTTP с результатом ''rcode'', с дополнительными атрибутами HTTP ''httpattrs'', дополнительным элементом заголовка HTML ''htmlHeadEls'' и использованием файла шаблона ''forceTmplFile''. ** ''cnt'' — содержимое страницы или ресурса (изображения, XML, CSS, JavaScript, ...); ** ''rcode'' — результирующий код HTTP, вроде "200 OK"; пустое значение выключает добавление HTTP заголовка; ** ''httpattrs'' — дополнительные атрибуты HTTP, в основном это "Content-Type" со значением по умолчанию "text/html;charset={SYS}"; только для "Content-Type: text/html" будет осуществляться заворачивание во внутренний/сервисный, или определённый ''forceTmplFile'', HTML-шаблон; ** ''htmlHeadEls'' — дополнительный тег заголовка HTML, в основном это META с "Refresh" для указанного URL; ** ''forceTmplFile'' — файл прямо определённого шаблона для перекрытия внутреннего/сервисного или главной страницы. <section end=API /> API пользовательского программирования
Входная часть объекта модуля (SYS.Protocol.HTTP.{In})
bool setUser( string user ) — меняет пользователя связанного с идентификатором сеанса аутентификации.
user — пользователя для смены.
bool pgAccess(string URL) — проверяет доступность страницы, определённой в URL .
URL — URL страницы, которая проверяется.
string pgCreator(string cnt, string rcode = "", string httpattrs = "Content-Type: text/html;charset={SYS}", string htmlHeadEls = "", string forceTmplFile = "") — формирует страницу или ресурс из содержимого cnt , обёрнутого в HTTP с результатом rcode , с дополнительными атрибутами HTTP httpattrs , дополнительным элементом заголовка HTML htmlHeadEls и использованием файла шаблона forceTmplFile .
cnt — содержимое страницы или ресурса (изображения, XML, CSS, JavaScript, ...);
rcode — результирующий код HTTP, вроде "200 OK"; пустое значение выключает добавление HTTP заголовка;
httpattrs — дополнительные атрибуты HTTP, в основном это "Content-Type" со значением по умолчанию "text/html;charset={SYS}"; только для "Content-Type: text/html" будет осуществляться заворачивание во внутренний/сервисный, или определённый forceTmplFile , HTML-шаблон;
htmlHeadEls — дополнительный тег заголовка HTML, в основном это META с "Refresh" для указанного URL;
forceTmplFile — файл прямо определённого шаблона для перекрытия внутреннего/сервисного или главной страницы.