filestack / filestack-java

Official Java SDK for Filestack - API and content management system that makes it easy to add powerful file uploading and transformation capabilities to any web or mobile application.
https://filestack.com
Apache License 2.0
18 stars 18 forks source link

Refactor how requests to CloudRouter are made #47

Closed shawnmaten closed 6 years ago

shawnmaten commented 6 years ago

The requests to CloudRouter (the internal service that handles file listing, transfers, etc for cloud storage) are currently made using Retrofit and involve POJO serialization. But the service isn't RESTful, it's really a JSON-RPC, and Retrofit doesn't integrate well with it. And because of its response formatting, it also doesn't work well with POJO serialization.

I think it would be less clunky if we either 1) found a better library to use for this or 2) did something more basic with OkHttp and Gson. I didn't really like this when I made it, but now there's cause to fix it because the awkwardness of trying to map everything to a Java object is partly what lead to an issue in the Android SDK. I mapped the S3 headers to an object, but it turns out I didn't know all the headers to expect.

More formally fixes the below:

shawnmaten commented 6 years ago

Moved to internal tracker: https://filestack.atlassian.net/browse/FS-3349