
1 zhchyu999 2018 年 9 月 16 日 via Android okhttp 有个拦截器 |
2 saximoer 2018 年 9 月 16 日 ohhttp 有一个 Interceptor 接口 实现这个接口就 实现了拦截器的功能 然后记得把这个拦截器加入 okhttp 的声明中就可以了 |
3 hongch 2018 年 9 月 16 日 via iPhone intercept 可以看一下 okhttp 源码 interceptchain 允许加入两个 intercept 分别是请求前和请求后 |
4 nextdiscover OP |
5 nextdiscover OP |
6 nextdiscover OP |
7 saximoer 2018 年 9 月 17 日 |
8 wsxyeah 2018 年 9 月 17 日 via iPhone interceptor 里肯定不能直接拿到 retrofit 里的 field 啊,只能拿到 request body,可以从 request body 里取出字段再操作 |
9 nextdiscover OP @wsxyeah 嗯嗯,今天试试,谢谢 |
10 nextdiscover OP @saximoer 谢谢,我去看看 |
11 hongch 2018 年 9 月 17 日 - - @nextdiscover 当然是拿 requestbody 如果是 get 请求就从 url 里拿 |
12 zhchyu999 2018 年 9 月 17 日 印象中好像是改不了,得 new 一个新的 |
13 lx0758 2018 年 12 月 19 日 |