Skip to main content

route

Function route 

Source
pub fn route(
    record: &FrontDoorRecord,
    method: &str,
    path: &str,
    accept: &str,
) -> HttpReply
Expand description

Route one HTTP request against a FrontDoorRecordpure, no I/O.

  • GET on crate::qdp_server::WELL_KNOWN_QDP_PATH (query string stripped) → render_profile with the Accept value.
    • Ok200 with the negotiated content-type and body.
    • Err500 text/plain carrying the error message.
  • anything else → 404 text/plain not found.

The method match is ASCII-case-insensitive; the path is compared after stripping any ?query.