I am using the following code to upload the files to Box.net from Salesforce using V2 api and got the following error
System.HttpResponse[Status=Not Found, StatusCode=404]
String sUrl = 'https://upload.box.com/api/2.0/files/data' ;
Http h = new Http();
HttpRequest req = new HttpRequest();
req.setEndpoint(sUrl);
req.setHeader('Authorization', newAuthorization);
req.setMethod('POST');
req.setHeader('Content-Type', 'application/pdf');
String content = '{"filename":"/Users/rmasineni/temp/DealPackage/Cederquist Credit Memo.pdf", "folder_id":"0"}';
//String content = '{"filename":"&", "folder_id":"0"}';
req.setbody(content);
HttpResponse res;
res = h.send(req);
It will be great if someone helps me on how to use Box-api V2 to upload the files .
Thanks, Rag