Code example for HttpException

0
		case 200: 
			return body;
		case 404: 
			throw new HttpException();
		default: 
			throw new HttpException("Response returned code " + code + " -- body content: " + body);
		} 
	} 
 
	private List<NameValuePair> makeParamList(Map<String, String> params) {
		List<NameValuePair> paramList = new java.util.ArrayList<NameValuePair>();
 
		for (String param : params.keySet()) {
			paramList.add(new BasicNameValuePair(param, params.get(param)));
		} 
 
		return paramList;
	} 
 
	private String makeParamsForGet(Map<String, String> params) {
		return URLEncodedUtils.format(makeParamList(params), "UTF-8");