Search in sources :

Example 1 with BasicStatusLine

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));
}
Also used : BasicStatusLine(org.openecard.apache.http.message.BasicStatusLine) StatusLine(org.openecard.apache.http.StatusLine) Locale(java.util.Locale) BasicStatusLine(org.openecard.apache.http.message.BasicStatusLine)

Aggregations

Locale (java.util.Locale)1 StatusLine (org.openecard.apache.http.StatusLine)1 BasicStatusLine (org.openecard.apache.http.message.BasicStatusLine)1