I am using AFNetworking 2.0 & new to it. Tried couple of sample WS calls with success. We have Web Service implemented & to be called like:
It's data parameter is encrypted string.
Request is: http://demo.XYZ.net/getlanguage // Just for example
Parameters:
1) first you need to crate json with parameter like below dictionary to string
{
param = {
pone = "com.xyz";
ptwo = 68208;
pthree = eda24e95f;
};
}
to
{"param":{"pone":"com.xyz","ptwo":"68208","pthree":"eda24e95f"}}
2) and then convert json string into the base64encode
something like: eyJob21lIjp7InNGFlMGEzZDg1Mzg3YTNkYmFlZDQ5MzBiMCIsInNhbHQiOiI3OTU2IiwicGFj5uY19
3) and then convert string into the urlencode then send encrypted string in "data" with post method
eyJob21lIjp7InNpZ24iOiJiZmU4Y2RmZGEzZDg1Mzg3YTNkYmFlZDQ5MzBiMCIsInNhbHQi%0AOiI3OTU2IiwicGFja2FnZSI6ImNvbS5uYmJk
Then Finally Pass that encoded string as below:
http://demo.XYZ.net/getlanguage?data=eyJob21lIjp7InNpZ24iOiJiZmU4Y2RmZGEzZDg1Mzg3YTNkYmFlZDQ5MzBiMCIsInNhbHQi%0AOiI3OTU2IiwicGFja2FnZSI6ImNvbS5uYmJk
Above WS is perfectly working.[Checked on "POSTMan-Chrome-Extension"]
The question is how to implement same with AFNetworking 2.0 ? where to encrypt using params like above when we use AFHTTPRequestOperationManager?
Thanks