I'm using the BackgroundUploader to upload to a cloud service that uses OAuth
If I set an header with :
uploader.SetRequestHeader("Authorization", "OAuth "+ header);
and just do:
UploadOperation upload = uploader.CreateUpload(uri, file);
I can see in fiddler that the header is not sent!
But if I use the :
List<BackgroundTransferContentPart> parts = new List<BackgroundTransferContentPart>();
var part = new BackgroundTransferContentPart();
part.SetFile(file);
parts.Add(part);
and then
UploadOperation upload = await uploader.CreateUploadAsync(uri, parts);
It sends the header.
The problem is my Cloud Service needs the file to be sent on the body and with the BackgroundTransferPart the body has more than the files (bondaries etc etc)
Any thoughts on how to fix my first scenário?
cmorgado