Code example for HttpRequestBase

Methods: setHeader

0
        return params;
    } 
 
    public void setHeader(String name, String value) {
        headers.put(name, value);
        request.setHeader(name, value);
    } 
 
    public HttpRequestBase getRequest() throws Exception {
        prepareRequest(); 
        return request;
    } 
 
    public void setEntity(HttpEntity data) throws Exception {
        entity = data;
    } 
 
    public void setEntity(String data) throws Exception {
        entity = new StringEntity(data, DEFAULT_ENCODING);
    }