pub fn build_error_html(response: &mut Response, mut resource: String, error_message: String) -> Vec<u8> {
    let error_code: &str = &response.response_identifiers.method.id.to_string();
    let error_code_full: &str = &format!("{} {}", error_code, response.response_identifiers.method.name);

    resource = resource.replace("{{ErrorCode}}", error_code_full);
    resource = resource.replace("{{ErrorMessage}}", &error_message);

    resource.as_bytes().to_vec()
}
/// Dynamically replaces placeholders in the error_page resource with the code and description
Dynamically replaces placeholders in the error_page resource with the code and description
Dynamically replaces placeholders in the error_page resource with the code and description
pub fn build_error_html(response: &mut Response, mut resource: String, error_message: String) -> Vec<u8> {
    let error_code: &str = &response.response_identifiers.method.id.to_string();
    let error_code_full: &str = &format!("{} {}", error_code, response.response_identifiers.method.name);
    resource = resource.replace("{{ErrorCode}}", error_code_full);
    resource = resource.replace("{{ErrorMessage}}", &error_message);
    resource.as_bytes().to_vec()
}
pub fn build_error_html ( response : & mut Response , mut resource : String , error_message : String ) -> Vec < u8 > { let error_code : & str = & response . response_identifiers . method . id . to_string ( ) ; let error_code_full : & str = & format ! ( " " error_code response response_identifiers method name ) ; resource = resource . replace ( " " , error_code_full ) ; resource = resource . replace ( " " , & error_message ) ; resource . as_bytes ( ) . to_vec ( ) }
Dynamically replaces placeholders in the error_page resource with the code and description
Dynamically replaces placeholders in the error_page resource with the code and description
response
&mut Response
resource
String
error_message
String
response
&mut Response
resource
String
error_message
String