提交 679fa45a 编写于 作者: 如梦技术's avatar 如梦技术 🐛

mica-http followSslRedirects.

上级 cfe4c253
......@@ -133,9 +133,9 @@ lombok 生成的 method 问题:https://github.com/rzwitserloot/lombok/issues/1
- `IJPay` 支付 SDK 让支付触手可及:[https://gitee.com/javen205/IJPay](https://gitee.com/javen205/IJPay)
## 鸣谢
`mica-social` 参考了 [`JustAuth`](https://github.com/zhangyd-c/JustAuth) 并已经加入 JustAuth 开发者群,感谢 `JustAuth` 所有开发者的奉献。
`mica-social` 参考了 `JustAuth` 并已经加入 [JustAuth](https://github.com/zhangyd-c/JustAuth) 开发者群,感谢 `JustAuth` 所有开发者的奉献。
感谢 `如梦技术VIP群` 小伙伴们的支持。
感谢 `如梦技术VIP群` 小伙伴们的大力支持。
## 微信公众号
......
......@@ -50,6 +50,7 @@ public class HttpRequest {
private String userAgent;
private RequestBody requestBody;
private Boolean followRedirects;
private Boolean followSslRedirects;
private HttpLoggingInterceptor.Level level;
private CookieJar cookieJar;
private Interceptor interceptor;
......@@ -219,7 +220,10 @@ public class HttpRequest {
builder.cookieJar(cookieJar);
}
if (this.followRedirects != null) {
builder.followSslRedirects(this.followRedirects);
builder.followRedirects(this.followRedirects);
}
if (this.followSslRedirects != null) {
builder.followSslRedirects(this.followSslRedirects);
}
// 设置 User-Agent
this.requestBuilder.header("User-Agent", userAgent);
......@@ -301,6 +305,11 @@ public class HttpRequest {
return this;
}
public HttpRequest followSslRedirects(boolean followSslRedirects) {
this.followSslRedirects = followSslRedirects;
return this;
}
private static HttpLoggingInterceptor getLoggingInterceptor(HttpLoggingInterceptor.Level level) {
HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(Slf4jLogger.INSTANCE);
loggingInterceptor.setLevel(level);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册