I need to encode the body of my POST request but I don´t know which one to use.
I´m having a trouble with changing ´(´ into %28.
I was using so far NSUTF8StringEncoding, NSISOLatin1StringEncoding, NSISOLatin2StringEncoding. Non of them works.
The name of the parameter I have to send is:
monitoring_report[monitoring_report_time(1i)]=
which sould be transformed to:
monitoring_report%5monitoring_report_time%281i%29%5D=
and what I get is:
monitoring_report%5Bmonitoring_report_time(1i)%5D=
Use the Core Foundation function
CFURLCreateStringByAddingPercentEscapeswhich has alegalURLCharactersToBeEscapedparameter. Parenthesis in URLs are legal which is why they’re not escaped by default.Example: