This commit is contained in:
Looly 2022-05-31 22:06:28 +08:00
parent 191261b42d
commit e12c5f170a
2 changed files with 4 additions and 3 deletions

View File

@ -128,7 +128,7 @@ public class HttpResponse extends HttpBase<HttpResponse> implements Closeable {
* <li>Transfer-Encoding: Chunked</li> * <li>Transfer-Encoding: Chunked</li>
* <li>Content-Encoding: XXX</li> * <li>Content-Encoding: XXX</li>
* </ul> * </ul>
* 参考https://blog.csdn.net/jiang7701037/article/details/86304302 * 参考<a href="https://blog.csdn.net/jiang7701037/article/details/86304302">https://blog.csdn.net/jiang7701037/article/details/86304302</a>
* *
* @return 长度-1表示服务端未返回或长度无效 * @return 长度-1表示服务端未返回或长度无效
* @since 5.7.9 * @since 5.7.9
@ -309,7 +309,7 @@ public class HttpResponse extends HttpBase<HttpResponse> implements Closeable {
* 将响应内容写出到文件-避免未完成的文件<br> * 将响应内容写出到文件-避免未完成的文件<br>
* 异步模式下直接读取Http流写出同步模式下将存储在内存中的响应内容写出<br> * 异步模式下直接读取Http流写出同步模式下将存储在内存中的响应内容写出<br>
* 写出后会关闭Http流异步模式<br> * 写出后会关闭Http流异步模式<br>
* 来自https://gitee.com/dromara/hutool/pulls/407<br> * 来自<a href="https://gitee.com/dromara/hutool/pulls/407">https://gitee.com/dromara/hutool/pulls/407</a><br>
* 此方法原理是先在目标文件同级目录下创建临时文件下载之等下载完毕后重命名避免因下载错误导致的文件不完整 * 此方法原理是先在目标文件同级目录下创建临时文件下载之等下载完毕后重命名避免因下载错误导致的文件不完整
* *
* @param targetFileOrDir 写出到的文件或目录 * @param targetFileOrDir 写出到的文件或目录

View File

@ -208,6 +208,7 @@ public class HttpRequestTest {
@Test @Test
@Ignore @Ignore
public void getCookieTest(){ public void getCookieTest(){
HttpRequest.get("http://localhost:8888/getCookier").execute(); final HttpResponse execute = HttpRequest.get("http://localhost:8888/getCookier").execute();
Console.log(execute.getCookies());
} }
} }