I need to send the json dictionary as a parameter, I'm using afnetworking using the following code Getting an Exception:
FHTPAKAST Operation Manager * Manager = [FHTMLTPAVEST Operation Manager Manager]; Manager.responseSerializer.acceptableContentTypes = [NSSet set with object: @ "Application / Jason", zero]; Manager.requestSerializer = [AFJSOnUrUt Certilizer Serializer]; Manager.responseSerializer = [AFJSONResponseSerializer serializer]; NSDictionary * params = @ {@ "email": txt_email.text, @ "password": txt_password.text, @ "platform": @ "iphone"}; NSLog (@ "Parameter:% @", Parameter); SBJason Witter * Jason Vitter = [[SBJason Victor Alok] Init]; NSString * paramsDicJSONN = [jsonWriter StringWideAbject: Parameters]; NSString * str_url = [NSString stringWithFormat: @ "% @ do_signup", base URLlogin]; [Manager post: Stormer parameter: ParamodisGisance success: ^ (FHttpKAEASTA Operation * Operation, ID ResponseAbject) {NSLog (@ "OfferConclusion:% @", ResponseObject);
Exception:
Exclude the application due to exception exception 'NSInvalidArgumentException', Reason: '*** + [NSJSNSArilization DataWidth JasonAbject: Option: Error :]: Write JSON 'Invalid Top-Level Type'
About sending post data Read in
- (AFHTTPRequestOperation *) POST: (NSString *) URL string parameter: (NSDictionary *) parameter ...
parameter
Argument requires a NSDictionary
, not a JSON encoded NSString
. Most likely now leave the code parameter
and all the SBJsonWriter
code.
Comments
Post a Comment