pub fn http_send_with_auth(
remote: &RemoteUrl,
credentials: &mut dyn CredentialProvider,
perform: impl FnMut(Option<&str>) -> Result<HttpResponse>,
) -> Result<HttpResponse>Expand description
Perform an HTTP request, retrying once with credential-provider-supplied
authentication if the first attempt returns 401. perform is invoked with an
optional Authorization header value and must be idempotent (it may run twice).
A successful retry approves the credential with credentials; a still-401
retry rejects it.