I'm developing AirFile, which support multi clouds. Now, i'll support Office 365 & OneDrive Pro for Business. I has finished other operations as: get list of files, copy, move, upload, download, delete. But with Create a Folder, it cannot been finished!!
As Office 365 document APIS (http://msdn.microsoft.com/EN-US/library/office/dn605900(v=office.15).aspx#Folder4), i has set data when send a POST request with:
- (NSData *)postMehodData
{
NSString *params = @"{'__metadata':{'type':'MS.FileServices.Folder'},Name:'%@'}";
params = [NSString stringWithFormat:params, [self.folderName stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]];
return [params dataUsingEncoding:NSUTF8StringEncoding];
}
I has also set request' url as API references, but the result's always HTTP 400 code.
I also reference Android code from https://github.com/OfficeDev/Office-365-SDK-for-Android/blob/master/sdk/office365-files-sdk/src/com/microsoft/office365/files/FileClient.java, but i cannot see why it's wrong!
If i can missing any? Thanks any support.