2
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(
"http://xxxxxxx/geo/getlocation.php");
MultipartEntity reqEntity = new MultipartEntity(
HttpMultipartMode.BROWSER_COMPATIBLE);
reqEntity.addPart("longtiude", new StringBody(mylong));
reqEntity.addPart("latitude", new StringBody(mylat));
reqEntity.addPart("newtimeString", new StringBody(time));
reqEntity.addPart("dateString", new StringBody(date));
reqEntity.addPart("locationName", new StringBody(address));
httppost.setEntity(reqEntity);
HttpResponse response = httpclient.execute(httppost);
String responseBody = EntityUtils
.toString(response.getEntity());
Log.e("response", responseBody);
我正在使用httpclient在服务器上使用上述代码进行发布。但我得到了这样的回复您的回复请求没有被快速接收,请重试
Your post request is not being received quickly enough please retry
我已经正确添加权限和jar文件,也试过与basicnamevaluepair但同样的回应。 httpclient弃用,但它应该知道...
我不知道原因。我做错了什么。任何帮助请...
感谢如何解决这个问题。任何可能在服务器上更改的设置 – Senthil
@vsk取决于用于处理这些攻击的设备。例如,对于F5,这里是一个链接:https://devcentral.f5.com/tech-tips/articles/mitigating -slow-HTTP-POST-DDOS攻击与 - 的iRules#.UeEi4vk3CAg –