1 //Create a manager2Afhttprequestoperationmanager *manger=[Afhttprequestoperationmanager manager];3Manger.responseserializer.acceptablecontenttypes=[nsset setwithobjects:@"Application/json",@"Text/json",@"Text/javascript",@"text/html", nil];
4Manger.requestserializer =[Afhttprequestserializer serializer];5Manger.responseserializer =[Afhttpresponseserializer serializer];6NSString *url=[nsstring stringWithFormat:@"*********phonenumber=%@&pwd=%@", Self.phonenumtf.text,self.secrettf.text];7 8NSLog (@"%@", URL);9 Ten[Manger Get:url Parameters:nil success:^ (afhttprequestoperation * _nonnull operation,ID_nonnull Responseobject) { One ANSLog (@"responseobject###########%@", [Responseobjectclass]); -NSLog (@"###### #responseObject ########"); - -} failure:^ (Afhttprequestoperation * _nullable operation, Nserror *_nonnull Error) { - -NSLog (@"%@", error); +NSLog (@"##### #error ######"); - +}];
Before it was because did not write 3rd, 4, 5, so has been an error.
Resolution of 3840 errors when using AFN