Example usage for org.apache.http.client.methods HttpGetHC4 addHeader

List of usage examples for org.apache.http.client.methods HttpGetHC4 addHeader

Introduction

In this page you can find the example usage for org.apache.http.client.methods HttpGetHC4 addHeader.

Prototype

public void addHeader(Header header) 

Source Link

Usage

From source file:com.tingtingapps.securesms.mms.IncomingLegacyMmsConnection.java

private HttpUriRequest constructRequest(Apn contentApn, boolean useProxy) throws IOException {
    HttpGetHC4 request = new HttpGetHC4(contentApn.getMmsc());
    for (Header header : getBaseHeaders()) {
        request.addHeader(header);
    }/* w w  w  .j  a  v a2 s  .  c  o m*/
    if (useProxy) {
        HttpHost proxy = new HttpHost(contentApn.getProxy(), contentApn.getPort());
        request.setConfig(RequestConfig.custom().setProxy(proxy).build());
    }
    return request;
}