Code example for HttpRequestBase

Methods: setHeader

0
	 * @param request the request 
	 * @param useragent the useragent 
	 * @return the http request base 
	 */ 
	private HttpRequestBase setRequestHeaders(HttpRequestBase request, String useragent) {
		request.setHeader("Accept", sDataFormat);
		request.setHeader("Content-type", sDataFormat);
		request.setHeader("User-Agent", useragent);
		 
		return request; 
	} 
	 
	/** 
	 * Sets the post headers. 
	 * 
	 * @param request the request 
	 * @param useragent the useragent 
	 * @return the http request base 
	 */ 
	private HttpRequestBase setPostHeaders(HttpRequestBase request, String useragent) {
		request.setHeader("User-Agent", useragent);