Comments (10)
封装请求时,需对收集到的参数做统一加密,当涉及到文件时会转换base64编码
小伙子,你说参数加密要在 interceptArguments
做处理,这个我可以理解,但是要对文件做 base64 处理,这个就有点匪夷所思了,你为什么不直接传 base64 给框架?而是要先变成文件,然后再变成 base64,这样不是等于变相替换了参数的类型?
from easyhttp.
帅哥,你说的对,就是替换成加密参数,加密文件
我为什么不直接传 base64 给框架?而是要先变成文件,然后再变成 base64
因为是从图库里选的,不能选一张转一次base64吧,我的思路是选完了提交的时候一起处理,框架提供拦截参数这个位置也比较合适,一个出口,如果文件本身是base64的话这里不涉及转换
如果单独线程先转换,再提交,dialog方法可能比较繁琐,要show两次
from easyhttp.
小伙子,我理解文件转 base64 只能算编码,不能算加密吧?
from easyhttp.
不过你说的一点启发了我,不能在主线程发起网络请求,因为过程可能包含了一些耗时操作,不仅是你要做加密操作,框架内部会做一些反射操作,所以我把它放到子线程中来。
from easyhttp.
“小伙子,我理解文件转 base64 只能算编码,不能算加密吧?”
说错了,参数是AES,文件是base64
期待帅哥的下一个版本,感恩
from easyhttp.
from easyhttp.
@cnswan 小伙子,问题处理了,你可以用上面的版本试一下有没有这个问题,有问题及时反馈一下。
from easyhttp.
from easyhttp.
from easyhttp.
@cnswan 小伙子,你反馈的这两个问题,我经过核实,确实是真实存在的,目前我已经在框架内部做处理了,你可以下载上面的 aar 包做一下测试。
from easyhttp.
Related Issues (20)
- [疑惑]:请问GET请求支持传key同名value值不同的参数吗 HOT 3
- [建议]:增加支持ProtoBuf格式数据解析 HOT 2
- [疑惑]:需求:发起一个http请求,有可能因为参数或者网络请求出错,不想在请求失败时弹出toast,显示出错信息给用户来看,怎样处理? HOT 1
- [疑惑]:请大佬指示一下如何把对象作为参数传给后台 HOT 1
- [建议]:请问以后会支持断点续传的功能么 HOT 38
- [疑惑]:请求参数都是key=value&key=value?能不能变成json的格式 HOT 4
- [疑惑]:为什么初始化会走一遍 RequestHandler 的 requestFail 方法
- [疑惑]:请求中加入headers,这个headers的token加密后的值比较长 HOT 10
- [疑惑]:formRequest 如何统一转换为JsonRequest HOT 1
- [疑惑]:如何动态设置请求头 HOT 8
- [疑惑]:post提交参数的问题 是否可以直接map提交 HOT 2
- [疑惑]:为什么会出现多余的请求参数 HOT 5
- [Bug]:java.lang.ClassCastException: java.lang.Void cannot be cast to com.easy.demo.net.bean.HttpData HOT 8
- [疑惑]:关于easyHttp设置contentType,按照文档中的方法设置了,但是调用接口的时候还是会提示Content type 'application/x-www-form-urlencoded;charset=utf-8' not suppo HOT 1
- [疑惑]:是否有参数控制加载的时候 不出现加载动画? HOT 2
- [建议]:请求方式统一设置 HOT 8
- [Bug]:MMKV升级成1.3.2版本报错 HOT 7
- [Bug]:在AndroidProject Demo中搭配此库成功调用返回后,Object转型失败 HOT 1
- [疑惑]:业务场景:服务器双token形式,access_token失效了服务器会从接口返回新的access_token,客户端保存后要再次调用该接口获取数据 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from easyhttp.