本来我是做.net 但是需要对接别人java的回调的接口 他那边是get方式请求一个地址
这个地址是我给他的
他的代码是这个样的
boolean bool = true;
HttpClient client = new DefaultHttpClient();
HttpResponse httpResponse = null;
HttpGet get = null;
try {
get = new HttpGet(url);
httpResponse = client.execute(get);
if(httpResponse.getStatusLine().getStatusCode() == 200){
HttpEntity httpEntity = httpResponse.getEntity();
InputStream inputStream = httpEntity.getContent();
File file = new File(path);
if(!file.exists()){
file.mkdirs();
}
String fileName= url.substring(url.indexOf("imageName")+10,url.length());
String imgPath = path + File.separator + fileName;
OutputStream outStream = new FileOutputStream(imgPath);
IOUtils.copy(inputStream, outStream);
inputStream.close();
outStream.close();
bool = true;
http://100.96.36.36:9258/image/showImage.html?imageName=1712.JPG
我传给他一个这样的地址 他就用上面的代码请求 请问 我这个showImage页面应该怎么写?