HTTP请求返回415错误码定位解决方法
public class Test {
public static void main(String[] args) throws IOException {
String url = "http://ip:port/cip-cas/search";
String sendData = "{"appId":"***","contentName":"人民的名义","equipmentId":"***","requestSeq":"***","requestType":"1","userId":"***"}";
StringBuilder resultBuilder = new StringBuilder();
Map
headers.put("Content-Type", "application/json; charset=utf-8");
UrlConnectionHelper.post(url, sendData, "UTF-8", 8000, headers, resultBuilder);
System.out.println(resultBuilder.toString());
}
}
相关文章
- Tomcat部署web项目出现http状态404未找到的详细解决方案
- HTTP协议常用的请求头和响应头响应详解说明(学习)
- HttpClient基础解析
- Tomcat启动成功但无法访问http://localhost:8080/的解决方法
- AndroidHttpClient使用Cookie应用分析
- HttpServletRequest的getParameter()的坑及解决
- HTTP全部标准响应状态码整理
- Storm Sniffer(HTTP抓包网络调试利器)v2.1.9 苹果手机版
- Docker下多容器搭建 lamp的详细过程(httpd+mysql+php+redis)
- Android Https证书过期的两种解决方案