Http

124 阅读1分钟

一、加密种类

第一个

在实体Json上传的时候,可能需要对Json字符串进行加密
URLEncoder.encode(ct, "UTF-8"); //加密中文
URLDecoder.decode(ct, "UTF-8"); //解密中文

第二个 AES加密

第三个 BASE64转码

ContentType Http各种对照表: http://tool.oschina.net/commons/

MediaType.parse("application/octet-stream"); //用于设置ContentType