I think I’m nearly done with the REST API except for caching and testing the entire code. This week is quite an interesting week for me because there are two main things that I have to do: make a http request from the code itself to the Dropbox API, and upload a zipped file into the cloud storage. At first, I used Witty to make a http request but it turned out that POCO library is much easier as you don’t have to use a callback function to do that. After having used Witty for a long time, I find out that POCO library offers much more unique features and it makes many things so much easier. For example, streamcopier class helps to stream inputstream into outputstream or stringstream without having to make too much painful effort on. POCO zip library helps you to zip the file in only a line of code. One can easily make http request and get the response easily with the help of POCO httpclientsession library. Despite the advantages mentioned, there’s one thing bad about POCO. I tried to parse the output stream into a JSON object using POCO but it requires more effort than BOOST library as it needs to declare quite some classes and pointers in order to read or output response. In this case, BOOST library is definitely much better.

Up to this point I have managed to create an empty file in Dropbox through the REST API that I have been working on, but I haven’t tried uploading a zip file into Dropbox. I have done the code but I haven’t tested it. I will test it next week and try to move on to caching as soon as I finish with Project API.


0 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.