web_response->includeBytes

Returns included file content as bytes.

Target member

Signature

1web_response->includeBytes(path::string)

Returns included file content as bytes.

web_response->includeBytes is called with member syntax on a receiver value. web_response->includeBytes belongs at the request or response boundary. Treat visitor input as untrusted, validate before use, and encode values before writing them into HTML.

Parameters

path
Required value of type string. Supply path positionally unless the signature shows a keyword form.

Examples

Basic call

1web_response->includeBytes('/assets/logo.png')
The example belongs near a request or response boundary; validate visitor input before trusting it.