.Inline method

Executed for rendering a file within a HTML document. Also called, inlining the file.

Summary

  • The returned response body MUST contain HTML5 code valid within the <body> tag.
  • You may require scripts, stylesheets etc via a string attribute head defined on the response file. Tags defined in this attribute are expected to be propagated by the callee. Note that the <title> tag is not allowed, setting it is the concern of the top-most transaction (responding to a request as defined in .Request).
  • The response status-code MAY be set. By default it is 0 which has the same meaning as 200. Any non 0 or 200 status-code is expected to be propagated by the callee and returned to the client. 3xx beats anything under 300, 4xx beats 3xx, 5xx beats 4xx. The first from any status-code category (200, 3xx, 4xx, 5xx) will be returned.
  • You may return a .Trust file as a child of the response file to specify Content-Security-Policy rules. Alternatively, if the .Trust file is defined on the app, Boomla will pick it up automatically.

Note that the .Inline file is executed transactionally in an isolated environment. Upon a server error or a 5xx statusCode, the entire transaction will be rolled back. (If you removed files, those changes will not take effect.) This saves you from implementing a rollback logic yourself.