Skip to main content

serve_app_request

Function serve_app_request 

Source
pub fn serve_app_request(
    app: &AppRuntime,
    method: &str,
    target: &str,
) -> StaticResponse
Expand description

Serves one request using the extracted static-runtime crate.

§Parameters

  • app: Application runtime whose packaged artifact tree is being served.
  • method: HTTP method for the static asset request.
  • target: Request path within the packaged artifact tree.

§Returns

Returns the static response produced for the requested artifact path.

§Examples

ⓘ
let _result = pharos_native::binaries::artifact_server::serve_app_request(todo!(), todo!(), "/");