class HttpClient implements IHttpClient {

	public String post(String url, Object reqObj) throws IOException,BrokerException {
		String json = "";
		if (reqObj != null) { 
			json = JsonUtil.toJsonNull(reqObj);
		}
		Response response = null;
		Transaction transaction = Tracer.newTransaction("mq-http", url);
		try {
			RequestBody body = RequestBody.create(JSONTYPE, json);
			Request.Builder requestbuilder = new Request.Builder().url(url).post(body);
			CatContext catContext=Tracer.logRemoteCallClient();
			if(catContext!=null){
				requestbuilder.addHeader(CatContext.CHILD, catContext.getProperty(CatContext.CHILD));
				requestbuilder.addHeader(CatContext.PARENT, catContext.getProperty(CatContext.PARENT));
				requestbuilder.addHeader(CatContext.ROOT, catContext.getProperty(CatContext.ROOT));
			}
			Request request=requestbuilder.build();
			response = client.newCall(request).execute();		
			transaction.setStatus(Transaction.SUCCESS);			
			if (response.isSuccessful()) {
				return response.body().string();
			} else {
				BrokerException exception = new BrokerException(
						response.code() + " error,and message is " + response.message()+",json is "+json);
				throw exception;
			}
		} catch (IOException e) {
			transaction.setStatus(e);
			throw e;
		}catch (Exception e) {
			transaction.setStatus(e);
			throw e;
		}
		finally {
			transaction.complete();
			try {
				if (response != null) {
					response.close();
				}
			} catch (Exception e) {

			}
		}
	}

	public  HttpClient(long connTimeout, long readTimeout);
	public  HttpClient();

}