Reading files from SharePoint

I apologize for hijacking the related post from Joerg Bruening from yesterday, but I was having issues replying to that message and thought I'd try a new post. I just wanted to share a component I wrote that reads from document libraries in the online 365 version of SharePoint, which seems to share the same REST API as OneDrive.

As Sarah pointed out, the authentication was the weirdest part. I found the post at http://paulryan.com.au/2014/spo-remote-authentication-rest/ to be a great resource with this.

I created this protocol with components which successfully authenticate and read/write a file from/to my document library, so I thought it might be useful to others struggling to get content into and out of SharePoint. They could definitely be cleaned up a bit, but they get the job done for me.