Server returned HTTP response code: 400 for URL:
Posted 程序工厂
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Server returned HTTP response code: 400 for URL:相关的知识,希望对你有一定的参考价值。
java下载文件报错
Server returned HTTP response code: 400 for URL: xxxxxxxxxxxxx
下载地址里有 / 在Linux的时候没问题,在win环境下会报错
解决方法
String url = "http://127.0.0.1:8080/zip\\20210528\\17\\demo.zip";
url = url.replace("\\\\","");
以上是关于Server returned HTTP response code: 400 for URL:的主要内容,如果未能解决你的问题,请参考以下文章
Server returned HTTP response code: 400 for URL:
Server returned HTTP response code: 400 for URL:
java.io.IOException: Server returned HTTP response code: 411 for URL