вызов веб-службы с использованием AFNetworking 3.0 со значением параметра не является английским символом (гуджарати / хинди).
мои параметры следующие: 1) TokenID 2) приложение 3) UserID 4) addUpdateCustomerJson
Здесь мой параметр 'addUpdateCustomerJson' является строкой json, поэтому он будет содержать NSMutableDictionary и NSMutableArray.
Parameters: AddressDetails = "[\n {\n \"Pincode\" : \"400031\",\n \"State\" : \"Maharashtra\",\n \"Lattitude\" : 19.017614699999999,\n \"AddressLine1\" : \"Victory Container Movies\",\n \"Longitude\" : 72.856164399999997,\n \"AddressLine2\" : \"Wadala\",\n \"Country\" : \"India\",\n \"Type\" : 1,\n \"City\" : \"Mumbai\"\n }\n]";
Application = SalesPro;
CompanyID = 1;
CustVendorDetails = "{\n \"MobileNo\" : \"345345345334\",\n \"ContactNo\" : \"\",\n \"LandlineNo\" : \"\",\n \"Tax_Type\" : \"VAT\",\n \"CustomerCode\" : \"\",\n \"DistributorID\" : 0,\n \"CreatedBy\" : 18,\n \"Name\" : \"\U0ab9\U0abf\U0ab0\",\n \"EmailTo\" : \"\",\n \"EmailID\" : \"\",\n \"CompanyTypeID\" : 1,\n \"Type\" : \"U\",\n \"BirthDate\" : \"\",\n \"PrimatyUserID\" : 18,\n \"TaggedToID\" : 18,\n \"SegmentID\" : 0,\n \"CustomerClass\" : 1,\n \"Description\" : \"\",\n \"Key_Customer\" : false,\n \"CompanyID\" : 1,\n \"CustomerGSTNo\" : \"\",\n \"OwnerID\" : 18,\n \"ContactName\" : \"\"\n}";
TaggedUsersList = "[\n {\n \"TaggedUserID\" : 18\n }\n]";
TokenID = BBF7B1E82D75939E9F29FCC59F0EF542;
UserID = 18;
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
manager.responseSerializer = [AFJSONResponseSerializer serializer];
manager.requestSerializer = [AFJSONRequestSerializer serializer];
NSLog(@"Customer Add/Edit JSON Object %@",[maindict description]);
[manager POST:kWSUrlAddCustomerVendor parameters:maindict constructingBodyWithBlock:^(id<AFMultipartFormData> _Nonnull formData) {
} progress:^(NSProgress * _Nonnull uploadProgress) {
} success:^(NSURLSessionDataTask * _Nonnull task, id _Nullable responseObject) {
[SVProgressHUD dismiss];
NSDictionary *dict = (NSDictionary *)responseObject;
NSLog(@"%@",[dict description]);
} failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
}];
Ответ:
data = {
AddressList = (
{
AddressID = 2056;
}
);
CompanyID = 1;
MobileNo = 345345345334;
Name = "\U00e0\U00aa\U00b9\U00e0\U00aa\U00bf\U00e0\U00aa\U00b0";
TaggedToIDList = (
{
ID = 4866;
}
);
isActive = 1;
};
message = "Customer Created successfully";
status = Success;
Проблема в поле «Имя»
в кодировке UTF
Заранее спасибо