use of org.openecard.apache.http.message.BasicStatusLine in project open-ecard by ecsec.
the class StatusLineResponseInterceptor method process.
@Override
public void process(HttpResponse hr, HttpContext hc) throws HttpException, IOException {
StatusLine statusLine = hr.getStatusLine();
int statusCode = statusLine.getStatusCode();
Locale locale = hr.getLocale();
String reason = statusLine.getReasonPhrase();
reason = reason != null ? reason : reasonForCode(statusCode, locale);
hr.setStatusLine(new BasicStatusLine(statusLine.getProtocolVersion(), statusCode, reason));
}
Aggregations