Closed kefahB closed 4 years ago
It is for some reason the data come one success the data.enumerateKeysAndObjectsUsingBlock
and data.class().name
both are undefined
! because of this the condition it go to the else
where return the data as it from the server !
also the content is empty but
Tried to replace this line
} else {
content = data;
}
By this and it work perfectly ! on my server I do nothing special !
} else {
let serial = NSJSONSerialization.dataWithJSONObjectOptionsError(data, NSJSONWritingOptions.PrettyPrinted);
content = NSString.alloc().initWithDataEncoding(serial, NSUTF8StringEncoding).toString();
}
Hi @EddyVerbruggen ,
I try to implement your plugin but I receive a malformed data from php ! with fetch module it work as expected
To debug I send a response like this from php :
look it is malformed