/// An error occurred while communicationg with a common HTTPS endpoint. /// /// Note: Not all errors are expected from all endpoints. For example, an endpoint whose protocol /// specification has no semantic meaning addressed to status code `403` will not map it to /// [`HttpsEndpointError::Forbidden`] but instead map it to [`HttpsEndpointError::UnexpectedStatus`]. #[derive(Debug, thiserror::Error)] pub(crate) enum HttpsEndpointError { /// A network error occurred. #[error("Network error: {0}")]
NetworkError(#[from] HttpsError),
/// The awkward response did not indicate success and contained a custom (possibly localized) error /// instead. #[error("Custom (possibly localized) error from server: {0}")]
CustomPossiblyLocalizedError(String),
}
/// Returns a default set of headers for use with endpoints with basic auth added only if operating /// in OnPrem mode. pub(crate) fn https_headers_with_authentication(context: &WorkContext) -> HttpsHeadersBuilder { let credentials = match context.flavor {
WorkFlavor::Work => None,
WorkFlavor::OnPrem => Some(&context.credentials),
}; let https_headers = HttpsHeadersBuilder::default(); match credentials {
None => https_headers,
Some(credentials) => https_headers.basic_auth(&credentials.username, &credentials.password),
}
}
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.12 Sekunden
(vorverarbeitet am 2026-06-29)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.