pub async fn get_subsequent_load(
        &self,
        raw_path: PathWithoutLocale,
        locale: String,
        entity_name: String,
        was_incremental_match: bool,
        req: Request,
    ) -> ApiResponse {
        // Check if the locale is supported
        if self.locales.is_supported(&locale) {
            // Parse the path
            let raw_path = raw_path.strip_prefix('/').unwrap_or(&raw_path);
            let raw_path = raw_path.strip_suffix('/').unwrap_or(raw_path);
            let path = PathWithoutLocale(match raw_path.strip_suffix(".json") {
                Some(path) => path.to_string(),
                None => {
                    return ApiResponse::err(StatusCode::BAD_REQUEST, "paths must end in `.json`")
                }
            });

            let page_data_partial = self
                .get_state_for_path(path, locale, &entity_name, was_incremental_match, req)
                .await;
            let page_data_partial = match page_data_partial {
                Ok(partial) => partial,
                Err(err) => {
                    // Parse the error to an appropriate status code
                    let status = StatusCode::from_u16(err_to_status_code(&err)).unwrap();
                    let msg = fmt_err(&err);
                    return ApiResponse::err(status, &msg);
                }
            };

            // We know the form of this, and it should never fail
            let page_data_str = serde_json::to_string(&page_data_partial).unwrap();
            ApiResponse::ok(&page_data_str).content_type("application/json")
        } else {
            ApiResponse::not_found("locale not supported")
        }
    }
The endpoint for getting page/capsule data through the subsequent load
system.

The path provided to this may have trailing slashes, these will be
handled. It is expected to end in `.json` (needed for compatibility
with the exporting system).

Subsequent loads have the MIME type `application/json`.
packages/perseus/src/turbine/server.rs