AFNetWorking如何在发送数据之前拿到转为json的参数 对他进行加密?
ringa_lee
I think the first choice for encryption is https, so that you can encrypt the body without manually writing the encryption algorithm.
If you must encrypt according to your own protocol, you can
NSMutableURLRequest *request = [[AFHTTPRequestSerializer serializer] requestWithMethod: URLString: parameters: error:];
In this way, we first get the request, and then get request.HTTPBody. After the encryption is completed,
request.HTTPBody
AFHTTPRequestOperation *operation = [manager HTTPRequestOperationWithRequest:request success:nil failure:nil];
Send it out again...
I think the first choice for encryption is https, so that you can encrypt the body without manually writing the encryption algorithm.
If you must encrypt according to your own protocol, you can
In this way, we first get the request, and then get
request.HTTPBody
. After the encryption is completed,Send it out again...