http转发实现之一:转发代码的实现(三)

2014-11-24 08:12:22 · 作者: · 浏览: 4
xception,
IOException {

return request(url, data, methodType, timeout, JSONObject
.fromObject(jsonFmtHeaders));
}

public static Map< , > request(String url, byte[] data, String methodType,
int timeout) throws HttpException, IOException {
writeLog.write("dispatch_","Connector request().");
return request(url, data, methodType, timeout, (JSONObject) null);
}

private static Map header2Map(Header[] headers) {
Map tmp = null;
if (null != headers) {
tmp = new HashMap();
for (Header header : headers) {
tmp.put(header.getName(), header.getValue());
}
}
return tmp;
}
}


作者 Willon_tom