public HttpEntity buildRequestEntity() {
		HttpEntity entity = null;
		
		//默认为URL类型请求
		if(requestEntityType == null) {
			requestEntityType = RequestEntityType.URL;
		}
		
		try {
			switch (requestEntityType) {
			case URL: {
				entity = new UrlEncodedFormEntity(params, Charset.forName(encoding));
				break;
			}
			case FILE: {
				entity = new FileEntity(requestFile, 
						contentType.withCharset(Charset.forName(encoding)));
				break;
			}
			case INPUT_STREAM: {
				entity = new InputStreamEntity(requestInputStream, 
						contentType.withCharset(Charset.forName(encoding)));
				break;
			}
			case BYTE_ARRAY: {
				entity = new ByteArrayEntity(requestByteArray, 
						contentType.withCharset(Charset.forName(encoding)));
				break;
			}
			case MULTIPART: {
				//大部分情况下使用浏览器兼容模式
				entity = this.multipartEntityBuilder.
						setCharset(Charset.forName(encoding)).build();
				
				break;
			}
			default:
				break;
			}
			
		} catch (Exception e) {
			logger.error(RequestConstants.MSG_UNSUPPORTED_ENCODING + e.toString());
		}
		
		return entity;
		
	}