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)
- [疑惑]:我在APP里面集成了easyHttp,然后集成了一个第三方库,也集成了easyHttp 应该怎么分别调用 HOT 2
- [疑惑]:后端需要一个参数值为 null,但是设置为 null 后参数不会提交给后台 HOT 3
- [疑惑]:看文档介绍该框架是支持Android API 14及以上即可,我的设备是API 19的(Android4.4.2),但是使用此框架访问接口报了这个错误 HOT 5
- [Bug]:请求头参数的字母被转成小写了 HOT 2
- [建议]:是否支持文件上传断点续传 HOT 2
- [Bug]:下载txt文件 进度是-1,其他文件正常,跟文件有关系吗
- [疑惑]:Get请求能否实现 https://ebook/note/delete/{id} 将id传入进去?路径传参好像一时半会儿还没找到解决办法 HOT 1
- [疑惑]:get请求,如何把接收的参数回调成string HOT 1
- [疑惑]:是否考虑支持viewModle HOT 1
- 接口直接返回了一个音频文件,这个框架该怎么处理呢? HOT 14
- [Bug]:java.lang.NoSuchMethodError: No direct method <init>(Ljava/util/Map;)V in class Lcom/google/gson/internal/ConstructorConstructor; or its super classes (declaration of 'com.google.gson.internal.ConstructorConstructor' HOT 1
- [疑惑]:发起get请求请求头的问题 HOT 2
- [疑惑]:USE_CACHE_FIRST缓存的问题 HOT 6
- [Bug]:调用接口报错,debug正常,release包存在错误 HOT 6
- [Bug]:java.lang.ClassCastException: java.lang.Void cannot be cast to com.hjq.easy.demo.http.model.HttpData HOT 15
- 数据解析出错 HOT 2
- [Bug]:偶现接口请求发不出去,无反应 HOT 2
- [疑惑]: HOT 2
- [疑惑]:轮子哥,请教下,要怎么在一个EasyHttp.download中配置新的OkHttpClient? HOT 8
- [Bug]:上传文件,进度条到100%后立即报IOException: Stream Closed HOT 2
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.