-
Notifications
You must be signed in to change notification settings - Fork 274
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add default transmit functionality #1
Comments
Serialization and transmission should be a fairly straightforward process. Since this library can be used on the JVM as well as on Android we don't want to make any assumptions as to what serialization library nor HTTP library the client would be using. If you're using GSON and an implementation of Apache's HttpPost p = new HttpPost("http://path/to/squash/endpoint");
p.setEntity(new StringEntity(gson.toJson(entry), "UTF-8"));
client.execute(p); |
Okay thanks. Took me a little longer to recreate that snippet, but that's where I'm at now. 😄 |
Well, this is definitively disappointing as one could use the JSR-330 to inject the HTTP client handler depending on the execution environment (JVM Vs. Android)... |
I was convinced that squash-java encapsulates the communication with the server. It took us long minutes to understand that it's not the case. IMHO, the standard transmit code (JVM+GSON) should be included by default (maybe in a documented separate branch). Best regards, --Martin |
The README shows an example that assumes you use Gson to serialize the SquashEntry and transmit it to the squash web service. When getting started using this, it'd be nice to have a class that would do that Gson and transmission work for you.
The text was updated successfully, but these errors were encountered: