Code example for HttpRequestBase

Methods: setHeader

0
	 * @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);
		request.setHeader("Accept", sDataFormat);
		request.setHeader("Content-type", sDataFormat);
		 
		return request; 
	} 
 
	/** 
	 * Throw http status exception. 
	 * 
	 * @param statusCode the status code 
	 * @throws HTTPStatusException the hTTP status exception 
	 */ 
	private void throwHttpStatusException(int statusCode) throws HTTPStatusException{
		switch (statusCode) {
			case HTTP_STATUS_BAD_REQUEST: