public HttpFetchResult(HttpResponse rep, String defaultCharset) throws Exception {
		entity = rep.getEntity();
		status = rep.getStatusLine();
		this.charset = defaultCharset;
		if (entity.getContentType() != null && entity.getContentType().getValue().contains("text/html")) {
			html = EntityUtils.toString(entity, charset);
		} else {
			contentData = EntityUtils.toByteArray(entity);
		}
	}