登录
注册
开源
企业版
高校版
搜索
帮助中心
使用条款
关于我们
开源
企业版
高校版
私有云
Gitee AI
NEW
我知道了
查看详情
登录
注册
1月18日,北京,聊聊2025如何加入技术开发?
代码拉取完成,页面将自动刷新
开源项目
>
程序开发
>
网络开发包
&&
捐赠
捐赠前请先登录
取消
前往登录
扫描微信二维码支付
取消
支付完成
支付提示
将跳转至支付宝完成支付
确定
取消
Watch
不关注
关注所有动态
仅关注版本发行动态
关注但不提醒动态
27
Star
140
Fork
39
xuexiangjys
/
XHttp2
代码
Issues
5
Pull Requests
0
Wiki
统计
流水线
服务
Gitee Pages
质量分析
Jenkins for Gitee
腾讯云托管
腾讯云 Serverless
悬镜安全
阿里云 SAE
Codeblitz
我知道了,不再自动展开
更新失败,请稍后重试!
Issues
/
详情
移除标识
内容风险标识
本任务被
标识为内容中包含有代码安全 Bug 、隐私泄露等敏感信息,仓库外成员不可访问
CustomDynamicInterceptor进行延时后两个异步请求的URL异常
待办的
#I4IF19
欣舞
创建于
2021-11-16 13:14
在CustomDynamicInterceptor进行延时后,连续发送两个异步POST请求,前一个请求的url被后一个替换 一、BUG重现思路: 1.首先在CustomDynamicInterceptor增加sleep,使得两个请求顺序非同步(实际展示情况)进行。 ``` public class CustomDynamicInterceptor extends BaseDynamicInterceptor<CustomDynamicInterceptor> { @Override protected TreeMap<String, Object> updateDynamicParams(TreeMap<String, Object> dynamicMap) { if (isAccessToken()) {//是否添加token //需要添加token的时候 也需要添加这些参数,用户id、默认仓库、默认语言 Logger.e("开始==="+DateUtils.getNowMills()); User currentUser = UserTokenUtils.getLoginUser(); try { Thread.sleep(1000); }catch(Exception e){ e.printStackTrace(); } //测试使用永久有效token dynamicMap.put("token", ""); Logger.e("结束==="+DateUtils.getNowMills()); } if (isSign()) {//是否添加签名 dynamicMap.put("sign", ""); } if (isTimeStamp()) {//是否添加请求时间戳 dynamicMap.put("timeStamp", DateUtils.getNowMills()); } return dynamicMap;//dynamicMap:是原有的全局参数+局部参数+新增的动态参数 } } ``` 2.使用XHttp.post请求调用 ``` XHttp.post("rfgetSectnByCctype") .upJson(new Gson().toJson(getSectn())) .keepJson(true) .accessToken(true) .syncRequest(false) .execute(sectnSimpleCallBack); XHttp.post("rfgetMatno") .upJson(new Gson().toJson(getMatno())) .keepJson(true) .accessToken(true) .syncRequest(false) .execute(matnoSimpleCallBack); ``` 二、结果展示 ``` D/[XHttp]: --> Subscriber is onStart I/[XHttp]: -------------------------------request------------------------------- --> POST http://192.168.1.4:20002/SWMS/services/rfgetSectnByCctype http/1.1 Accept: application/json I/[XHttp]: body:{"cctype":"CC","whouseno":"SEWDJ"} --> END POST E/[Logger]: 开始===1637038517831 I/[XHttp]: cacheMode=NO_CACHE D/[XHttp]: --> Subscriber is onStart I/[XHttp]: -------------------------------request------------------------------- I/[XHttp]: --> POST http://192.168.1.4:20002/SWMS/services/rfgetMatno http/1.1 Accept: application/json body:{"matno":"","mname":"","works":"vstrong"} --> END POST E/[Logger]: 开始===1637038517843 V/[Logger]: [onActivityResumed]:com.vstrong.wmsapp.core.BaseActivity I/zygote: Do partial code cache collection, code=496KB, data=322KB After code cache collection, code=496KB, data=322KB I/zygote: Increasing code cache capacity to 2MB D/EGL_emulation: eglMakeCurrent: 0x9dd855a0: ver 2 0 (tinfo 0x9dd83330) W/View: dispatchProvideAutofillStructure(): not laid out, ignoring dispatchProvideAutofillStructure(): not laid out, ignoring I/AssistStructure: Flattened final assist data: 5276 bytes, containing 1 windows, 21 views V/[Logger]: [onActivitySaveInstanceState]:com.vstrong.wmsapp.activity.MainActivity V/[Logger]: [onActivityStopped]:com.vstrong.wmsapp.activity.MainActivity E/[Logger]: 结束===1637038518832 E/[Logger]: 结束===1637038518844 I/[XHttp]: -------------------------------response------------------------------- <-- 405 Method Not Allowed http://192.168.1.4:20002/SWMS/services/rfgetMatno?deflang=zh&defwhouseno=SEWDJ&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJWU1RST05HV01TIiwic3ViIjoiQW5kcm9pZFRva2VuIiwidXNlcmlkIjoieGt4IiwiZXhwIjoxNjM3MDQxNDgwfQ.KhlSFhvCLGNuOGW065-yviks8QBbE6km3gvG7SFjqVs&userid=xkx (1018ms) Server: Apache-Coyote/1.1 I/[XHttp]: Pragma: no-cache Expires: 0 X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN I/[XHttp]: X-Content-Type-Options: nosniff I/[XHttp]: Allow: POST,GET,OPTIONS,HEAD Date: Tue, 16 Nov 2021 04:55:19 GMT Content-Length: 0 Cache-Control: no-cache I/[XHttp]: body: maybe [file part] , too large too print , ignored! <-- END HTTP E/[XHttp]: --> Subscriber is onError --> e instanceof ApiException, message:Method Not Allowed I/[XHttp]: -------------------------------response------------------------------- <-- 405 Method Not Allowed http://192.168.1.4:20002/SWMS/services/rfgetMatno?deflang=zh&defwhouseno=SEWDJ&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJWU1RST05HV01TIiwic3ViIjoiQW5kcm9pZFRva2VuIiwidXNlcmlkIjoieGt4IiwiZXhwIjoxNjM3MDQxNDgwfQ.KhlSFhvCLGNuOGW065-yviks8QBbE6km3gvG7SFjqVs&userid=xkx (1029ms) I/[XHttp]: ``` 三、原因试分析 使用XHttp.get()进行试验,发现get请求不会出错,BaseDynamicInterceptor中addGetParamsSign中的url来自参数request本身【HttpUrl httpUrl = request.url();】,而addPostParamsSign的url来自mHttpUrl,后一个请求进入拦截器的时候覆盖了上一个请求的mHttpUrl,导致出错。 ======= ps:问题描述如上,也可能是本人的使用方式有误,还望作者大大谅解,能指出使用错误之处,感谢。 感谢XUI、XHttp!!!
在CustomDynamicInterceptor进行延时后,连续发送两个异步POST请求,前一个请求的url被后一个替换 一、BUG重现思路: 1.首先在CustomDynamicInterceptor增加sleep,使得两个请求顺序非同步(实际展示情况)进行。 ``` public class CustomDynamicInterceptor extends BaseDynamicInterceptor<CustomDynamicInterceptor> { @Override protected TreeMap<String, Object> updateDynamicParams(TreeMap<String, Object> dynamicMap) { if (isAccessToken()) {//是否添加token //需要添加token的时候 也需要添加这些参数,用户id、默认仓库、默认语言 Logger.e("开始==="+DateUtils.getNowMills()); User currentUser = UserTokenUtils.getLoginUser(); try { Thread.sleep(1000); }catch(Exception e){ e.printStackTrace(); } //测试使用永久有效token dynamicMap.put("token", ""); Logger.e("结束==="+DateUtils.getNowMills()); } if (isSign()) {//是否添加签名 dynamicMap.put("sign", ""); } if (isTimeStamp()) {//是否添加请求时间戳 dynamicMap.put("timeStamp", DateUtils.getNowMills()); } return dynamicMap;//dynamicMap:是原有的全局参数+局部参数+新增的动态参数 } } ``` 2.使用XHttp.post请求调用 ``` XHttp.post("rfgetSectnByCctype") .upJson(new Gson().toJson(getSectn())) .keepJson(true) .accessToken(true) .syncRequest(false) .execute(sectnSimpleCallBack); XHttp.post("rfgetMatno") .upJson(new Gson().toJson(getMatno())) .keepJson(true) .accessToken(true) .syncRequest(false) .execute(matnoSimpleCallBack); ``` 二、结果展示 ``` D/[XHttp]: --> Subscriber is onStart I/[XHttp]: -------------------------------request------------------------------- --> POST http://192.168.1.4:20002/SWMS/services/rfgetSectnByCctype http/1.1 Accept: application/json I/[XHttp]: body:{"cctype":"CC","whouseno":"SEWDJ"} --> END POST E/[Logger]: 开始===1637038517831 I/[XHttp]: cacheMode=NO_CACHE D/[XHttp]: --> Subscriber is onStart I/[XHttp]: -------------------------------request------------------------------- I/[XHttp]: --> POST http://192.168.1.4:20002/SWMS/services/rfgetMatno http/1.1 Accept: application/json body:{"matno":"","mname":"","works":"vstrong"} --> END POST E/[Logger]: 开始===1637038517843 V/[Logger]: [onActivityResumed]:com.vstrong.wmsapp.core.BaseActivity I/zygote: Do partial code cache collection, code=496KB, data=322KB After code cache collection, code=496KB, data=322KB I/zygote: Increasing code cache capacity to 2MB D/EGL_emulation: eglMakeCurrent: 0x9dd855a0: ver 2 0 (tinfo 0x9dd83330) W/View: dispatchProvideAutofillStructure(): not laid out, ignoring dispatchProvideAutofillStructure(): not laid out, ignoring I/AssistStructure: Flattened final assist data: 5276 bytes, containing 1 windows, 21 views V/[Logger]: [onActivitySaveInstanceState]:com.vstrong.wmsapp.activity.MainActivity V/[Logger]: [onActivityStopped]:com.vstrong.wmsapp.activity.MainActivity E/[Logger]: 结束===1637038518832 E/[Logger]: 结束===1637038518844 I/[XHttp]: -------------------------------response------------------------------- <-- 405 Method Not Allowed http://192.168.1.4:20002/SWMS/services/rfgetMatno?deflang=zh&defwhouseno=SEWDJ&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJWU1RST05HV01TIiwic3ViIjoiQW5kcm9pZFRva2VuIiwidXNlcmlkIjoieGt4IiwiZXhwIjoxNjM3MDQxNDgwfQ.KhlSFhvCLGNuOGW065-yviks8QBbE6km3gvG7SFjqVs&userid=xkx (1018ms) Server: Apache-Coyote/1.1 I/[XHttp]: Pragma: no-cache Expires: 0 X-XSS-Protection: 1; mode=block X-Frame-Options: SAMEORIGIN I/[XHttp]: X-Content-Type-Options: nosniff I/[XHttp]: Allow: POST,GET,OPTIONS,HEAD Date: Tue, 16 Nov 2021 04:55:19 GMT Content-Length: 0 Cache-Control: no-cache I/[XHttp]: body: maybe [file part] , too large too print , ignored! <-- END HTTP E/[XHttp]: --> Subscriber is onError --> e instanceof ApiException, message:Method Not Allowed I/[XHttp]: -------------------------------response------------------------------- <-- 405 Method Not Allowed http://192.168.1.4:20002/SWMS/services/rfgetMatno?deflang=zh&defwhouseno=SEWDJ&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJWU1RST05HV01TIiwic3ViIjoiQW5kcm9pZFRva2VuIiwidXNlcmlkIjoieGt4IiwiZXhwIjoxNjM3MDQxNDgwfQ.KhlSFhvCLGNuOGW065-yviks8QBbE6km3gvG7SFjqVs&userid=xkx (1029ms) I/[XHttp]: ``` 三、原因试分析 使用XHttp.get()进行试验,发现get请求不会出错,BaseDynamicInterceptor中addGetParamsSign中的url来自参数request本身【HttpUrl httpUrl = request.url();】,而addPostParamsSign的url来自mHttpUrl,后一个请求进入拦截器的时候覆盖了上一个请求的mHttpUrl,导致出错。 ======= ps:问题描述如上,也可能是本人的使用方式有误,还望作者大大谅解,能指出使用错误之处,感谢。 感谢XUI、XHttp!!!
评论 (
0
)
欣舞
创建了
任务
欣舞
修改了
描述
原值
在CustomDynamicInterceptor进行延时后,连续发送两个异步POST请求,前一个请求的url被后一个替换
一、BUG重现思路:
1.首先在CustomDynamicInterceptor增加sleep,使得两个请求顺序非同步(实际展示情况)进行。
为什么延时,因为本人使用中需要从MMKV中获取用户信息,然后出现该错误
```
public class CustomDynamicInterceptor extends BaseDynamicInterceptor<CustomDynamicInterceptor> {
@Override
protected Tre
e
Map<String, Object> updateDynamicParams(TreeMap<String, Object> dynamicMap) {
if
(isAccessToken()) {//是否添加token
//需要添加token的时候 也需要添加这些参数,用户id、默认仓库、默认语言
Logger.e("开始==="+DateUtils.ge
t
NowMills());
User currentUser = UserTokenUtils.getLoginUser();
try
{
T
h
read.sleep(1000);
}catch(Excep
t
ion e){
e.printStackTrace();
}
//测试使用永久有效token
dynamicMap.put(
"
token", "");
Logger.e("结束==="+DateUtils.getNowMills());
}
if
(isSign()) {//是否添加签名
dynamicMap.put("sign", "");
}
if
(isTi
m
eSt
a
mp()) {//是否添加请求时间戳
dynamicMap.put("timeStamp", DateUtils.getNowMills());
}
return dynamicMap;//dynamicMap:是原有的全局参数+局部参数+新增的动态参数
}
}
```
2.使用XHttp.post请求调用
```
XHttp.post("rfgetSectnByCctype")
.
upJson(
n
ew Gson().toJson(getSectn()))
.
keepJ
s
on(true)
.
accessToken
(
true)
.
syn
c
Request(false)
.execute(sectnSimpleCallBack);
XHttp.post("rfgetMatn
o
")
.
upJson(
n
ew Gson().toJson(getMatno()))
.
keepJ
s
on(true)
.
accessToken
(
true)
.
syn
c
Reques
t
(false)
.execute(matnoSimpleCallBack);
```
二、结果展示
```
D
/[XHttp]: --
> Subscriber is onStart
I/[XHttp]: -------------------------------request-------------------------------
--> POST
http://192.168.1.4:20002/SWMS/services/rfgetSectnByCctype http/1.1
Accept: application/json
I/[XHttp]: body:{"cctype":"CC","whouseno":"SEWDJ"}
--> END
POST
E
/[
Logger]: 开始===1637038517831
I
/[XHttp]:
cacheMode=NO_CACHE
D
/[XHttp]: --
> Subscriber is onStart
I/[XHttp]: --
-----------------------------request-------------------------------
I/[XHttp]: --> POST http://192.168.1.4:20002/SWMS/services/rfgetMatno http/1.1
Accept:
a
pplication/json
body:{"matno":"","mname":"","works":"vstrong"}
--> END
POST
E
/[Logger]:
开始===1637038517843
V
/
[Logg
e
r]: [onActivityR
e
sumed]:
co
m.vs
t
r
on
g.wmsapp.core.B
a
seActivity
I/zygo
te
:
D
o
partial
co
de
c
ache coll
e
ction, code=496KB, data=322KB
Af
te
r
code cache
co
lle
c
tion, code=496KB, data=322KB
I
/
zygote: Increasing code cache capacity to 2MB
D
/
EGL_emulation: eglMakeCurrent: 0x9dd855a0: ver 2 0
(tinfo 0x9dd83330)
W/View: dispatchProvideAutofillS
t
ructure():
not laid out, ig
n
oring
d
is
pa
t
chProvideAutofillStructure(): not l
a
id out, ignoring
I
/
AssistStructure: Flatten
e
d final assist data: 5276 bytes, con
t
aining 1 windows, 21 views
V/[Logger]: [onActivityS
aveInstanceSta
t
e]:com.vstrong.wmsapp.
a
ctivity.MainActivity
V
/[Logger]:
[onActivityStopped]:com.vstrong.wmsapp.activity.MainActivity
E/[Logger]: 结束===16370385188
32
E
/[
Logger]: 结束===1637038518844
I/[XHttp]: -------------------------------response-------------------------------
<-- 405 Method Not Allowed http://192.168.1.4:20002/SWMS/services/rfgetMatno?deflang=zh&defwhouseno=SEWDJ&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJWU1RST05HV01TIiwic3ViIjoiQW5kcm9pZFRva2VuIiwidXNlcmlkIjoieGt4IiwiZXhwIjoxNjM3MDQxNDgwfQ.KhlSFhvCLGNuOGW065-yviks8QBbE6km3gvG7SFjqVs&userid=xkx (1018ms)
Server: Apache-C
o
yote/1.1
I/[XHtt
p
]: Pragma: no-cache
Expires: 0
X-
XSS-Protection: 1; mode=block
X-Frame-Options: SAMEORIGIN
I/[XHttp]:
X-C
o
ntent-
T
ype-Options: nosniff
I/[XHttp]
:
Allow:
POST,GET,OPTIONS,HEAD
Date: Tue, 16 Nov 2021 04:55:19 GMT
C
ont
e
nt-Length: 0
Cache-Control: no-cache
I/[XHttp]: body: maybe [file part] , too large too print , ignored!
<-- END HTTP
E/[XHttp]: --> Subscriber is onError
--> e instanceof ApiException, message:Method Not Allowed
I/[XHttp]: -------------------------------response-------------------------------
<-- 405
Method Not Allowed http://192.168.1.4:20002/SWMS/services/rfgetMatno?deflang=zh&defwhouseno=SEWDJ&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJWU1RST05HV01TIiwic3ViIjoiQW5kcm9pZFRva2VuIiwidXNlcmlkIjoieGt4IiwiZXhwIjoxNjM3MDQxNDgwfQ.KhlSFhvCLGNuOGW065-yviks8QBbE6km3gvG7SFjqVs&userid=xkx (1029ms)
I/[XHttp]:
```
三、原因试分析
使用XHttp.get()进行试验,发现get请求不会出错,BaseDynamicInterceptor中addGetParamsSign中的url来自参数request本身【HttpUrl httpUrl = request.url();】,而addPostParamsSign的url来自mHttpUrl,后一个请求进入拦截器的时候覆盖了上一个请求的mHttpUrl,导致出错。
=======
ps:问题描述如上,也可能是本人的使用方式有误,还望作者大大谅解,能指出使用错误之处,感谢。
感谢XUI、XHttp!!!
新值
在CustomDynamicInterceptor进行延时后,连续发送两个异步POST请求,前一个请求的url被后一个替换
一、BUG重现思路:
1.首先在CustomDynamicInterceptor增加sleep,使得两个请求顺序非同步(实际展示情况)进行。
```
public class CustomDynamicInterceptor extends BaseDynamicInterceptor<CustomDynamicInterceptor> {
@Override
protected TreeMap<String, Object> updateDynamicParams(TreeMap<String, Object> dynamicMap) {
if (isAcc
e
ssToken()) {//是否添加token
//需要添加token的时候 也需要添加这些参数,用户id、默认仓库、默认语言
Logger.e("开始==="+DateUtils.getNowMills());
User currentUser = UserTokenU
t
ils.getLoginUser();
try {
Thread.sleep(1000);
}catc
h
(Exception e){
e.printS
t
ackTrace();
}
//测试使用永久有效token
dynamicMap.put("token", "");
Logger.e("结束===
"
+DateUtils.getNowMills());
}
if (isSign()) {//是否添加签名
dynamicMap.put("sign", "");
}
if (isTimeStamp()) {//是否添加请求时间戳
dyna
m
icM
a
p.put("timeStamp", DateUtils.getNowMills());
}
return dynamicMap;//dynamicMap:是原有的全局参数+局部参数+新增的动态参数
}
}
```
2.使用XHttp.post请求调用
```
XHttp.post("rfgetSectnByCctype")
.upJson(new Gson().toJson(getSectn()))
.
keepJso
n
(true)
.
acces
s
Token(true)
.
syncRequest
(
false)
.
exe
c
ute(sectnSimpleCallBack);
XHttp.post("rfgetMatno")
.upJs
o
n(new Gson().toJson(getMatno()))
.
keepJso
n
(true)
.
acces
s
Token(true)
.
syncRequest
(
false)
.
exe
c
ute(ma
t
noSimpleCallBack);
```
二、结果展示
```
D/[XHttp]: --> Subscriber is onStart
I
/[XHttp]: --
-----------------------------request-------------------------------
--> POST http://192.168.1.4:20002/SWMS/services/rfgetSectnByCctype http/1.1
Accept:
application/json
I/[XHttp]: body:{"cctype":"CC","whouseno":"SEWDJ"}
--> END POST
E/[Logger]:
开始===1637038517831
I
/[
XHttp]: cacheMode=NO_CACHE
D
/[XHttp]:
--> Subscriber is onStart
I
/[XHttp]: --
-----------------------------request-------------------------------
I/[XHttp]: --
> POST http://192.168.1.4:20002/SWMS/services/rfgetMatno http/1.1
Accept: application/json
body:{"m
a
tno":"","mname":"","works":"vstrong"}
--> END POST
E/[Logger]:
开始===1637038517843
V
/[Logger]:
[onActivityResumed]:com.vstrong.wmsapp.core.BaseActivity
I
/
zygot
e
: Do partial cod
e
cache
co
llec
t
i
on
, code=496KB, d
a
ta=322KB
Af
te
r
c
o
de cache
co
lle
c
tion, cod
e
=496KB, data=322KB
I/zygo
te
:
Increasing
co
de
c
ache capacity to 2MB
D
/
EGL_emulation: eglMakeCurrent: 0x9dd855a0: ver 2 0 (tinfo 0x9dd83330)
W
/
View: dispatchProvideAutofillStructure(): not laid
out, ignoring
dispatchProvideAutofillStruc
t
ure(): not
laid out, ignori
n
g
I/Ass
is
tS
t
ructure: Flattened final assist dat
a
: 5276 bytes, containing 1 windows, 21 views
V
/
[Logger]: [onActivitySav
e
InstanceState]:com.vstrong.wmsapp.ac
t
ivity.MainActivity
V/[Logger]: [onActivityS
topped]:com.vs
t
rong.wmsapp.activity.M
a
inActivity
E
/[Logger]:
结束===1637038518832
E/[Logger]: 结束===16370385188
44
I
/[
XHttp]: -------------------------------response-------------------------------
<-- 405 Method Not Allowed http://192.168.1.4:20002/SWMS/services/rfgetMatno?deflang=zh&defwhouseno=SEWDJ&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJWU1RST05HV01TIiwic3ViIjoiQW5kcm9pZFRva2VuIiwidXNlcmlkIjoieGt4IiwiZXhwIjoxNjM3MDQxNDgwfQ.KhlSFhvCLGNuOGW065-yviks8QBbE6km3gvG7SFjqVs&userid=xkx (1018ms)
Server: Apache-Coyote/1.1
I/[XHttp]: Pragma: n
o
-cache
Ex
p
ires: 0
X-XSS-Protection: 1; mode=block
X-
Frame-Options: SAMEORIGIN
I/[XHttp]: X-Content-Type-Options: nosniff
I/[XHttp]:
All
o
w: POS
T
,GET,OPTIONS,HEAD
Date
:
Tue, 16
Nov 2021 04:55:19 GMT
Content-Length: 0
C
ach
e
-Control: no-cache
I/[XHttp]: body: maybe [file part] , too large too print , ignored!
<-- END HTTP
E/[XHttp]: --> Subscriber is onError
--> e instanceof ApiException, message:Method Not Allowed
I/[XHttp]: -------------------------------response-------------------------------
<-- 405 Method Not Allowed http://192.168.1.4:20002/SWMS/services/rfgetMatno?deflang=zh&defwhouseno=SEWDJ&token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJWU1RST05HV01TIiwic3ViIjoiQW5kcm9pZFRva2VuIiwidXNlcmlkIjoieGt4IiwiZXhwIjoxNjM3MDQxNDgwfQ.KhlSFhvCLGNuOGW065-yviks8QBbE6km3gvG7SFjqVs&userid=xkx (1029ms)
I/[XHttp]:
```
三、原因试分析
使用XHttp.get()进行试验,发现get请求不会出错,BaseDynamicInterceptor中addGetParamsSign中的url来自参数request本身【HttpUrl httpUrl = request.url();】,而addPostParamsSign的url来自mHttpUrl,后一个请求进入拦截器的时候覆盖了上一个请求的mHttpUrl,导致出错。
=======
ps:问题描述如上,也可能是本人的使用方式有误,还望作者大大谅解,能指出使用错误之处,感谢。
感谢XUI、XHttp!!!
欣舞
将
任务状态
从
待办的
修改为
进行中
欣舞
将
任务状态
从
进行中
修改为
待办的
展开全部操作日志
折叠全部操作日志
登录
后才可以发表评论
状态
待办的
待办的
进行中
已完成
已关闭
负责人
未设置
标签
未设置
标签管理
里程碑
未关联里程碑
未关联里程碑
Pull Requests
未关联
未关联
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
未关联
分支 (2)
标签 (10)
master
renovate/configure
2.0.4
2.0.3
2.0.2
2.0.1
2.0.0
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
开始日期   -   截止日期
-
置顶选项
不置顶
置顶等级:高
置顶等级:中
置顶等级:低
优先级
不指定
严重
主要
次要
不重要
参与者(1)
Android
1
https://gitee.com/xuexiangjys/XHttp2.git
[email protected]
:xuexiangjys/XHttp2.git
xuexiangjys
XHttp2
XHttp2
点此查找更多帮助
搜索帮助
Git 命令在线学习
如何在 Gitee 导入 GitHub 仓库
Git 仓库基础操作
企业版和社区版功能对比
SSH 公钥设置
如何处理代码冲突
仓库体积过大,如何减小?
如何找回被删除的仓库数据
Gitee 产品配额说明
GitHub仓库快速导入Gitee及同步更新
什么是 Release(发行版)
将 PHP 项目自动发布到 packagist.org
评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册