You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
private HttpResponse send(HttpUriRequest request, boolean failedAuth) {
try {
injectHeaders(request);
HttpResponse response = client.execute(request);
/**
* If the request failed because of authentication, and it
* wasn't a request to the SSO service, then the most likely
* cause is an expired SSO token. In this case we need to
* request a new token, and try the original request again, but
* only once. It if fails again, we just return the failed
* response.
*/
if (response.getStatusLine().getStatusCode() == 401 && !failedAuth) {
ssoToken = null;
authenticate();
response = send(request, true);
}
if (response.getFirstHeader("content-type") != null) {
checkContentType(XML_CONTENT_TYPE_RE, "XML", response.getFirstHeader("content-type").getValue());
}
return response;
}
catch (Exception e) {
throw new Error("Failed to send request", e);
}
}
private HttpResponse send(HttpUriRequest request, boolean failedAuth) {
try {
injectHeaders(request);
HttpResponse response = client.execute(request);
/**
* If the request failed because of authentication, and it
* wasn't a request to the SSO service, then the most likely
* cause is an expired SSO token. In this case we need to
* request a new token, and try the original request again, but
* only once. It if fails again, we just return the failed
* response.
*/
if (response.getStatusLine().getStatusCode() == 401 && !failedAuth) {
HttpEntity entity = response.getEntity();
if (null != entity) {
entity.getContent().close();
}
ssoToken = null;
authenticate();
response = send(request, true);
}
if (response.getFirstHeader("content-type") != null) {
checkContentType(XML_CONTENT_TYPE_RE, "XML", response.getFirstHeader("content-type").getValue());
}
return response;
}
catch (Exception e) {
throw new Error("Failed to send request", e);
}
}
The text was updated successfully, but these errors were encountered:
method: HttpConnection.send(HttpUriRequest request, boolean failedAuth)
old:
The text was updated successfully, but these errors were encountered: