if (!SECURITY_ENDPOINT_DOES_NOT_EXIST.equals(securityToken)) {
try {
if (securityToken == null) {
HttpGet httpGet = new HttpGet(getWsapiUrl() + SECURITY_TOKEN_URL);
httpGet.addHeader(BasicScheme.authenticate(credentials, "utf-8", false));
GetResponse getResponse = new GetResponse(doRequest(httpGet));
JsonObject operationResult = getResponse.getObject();
JsonPrimitive securityTokenPrimitive = operationResult.getAsJsonPrimitive(SECURITY_TOKEN_KEY);
securityToken = securityTokenPrimitive.getAsString();
}
request.setURI(new URIBuilder(request.getURI()).addParameter(SECURITY_TOKEN_PARAM_KEY, securityToken).build());
} catch (IOException e) {