-
Notifications
You must be signed in to change notification settings - Fork 7
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
Different types for posted and returned data #2
Comments
This is an interesting point. We discussed this for a very long time internally before deciding on the current approach. We ended up deciding on keeping it unified because:
I'm guessing here, but I assume that your If that's the case, you could rewrite your code as: User body = new User("[email protected]", "s0m3P4s5w0rd");
Rest.one("auth")
.put(body)
.request(); All null fields on Is there any reason why this wouldn't work on your scenario? Maybe we have a real issue here, and I'm not seeing it. |
Say my authentication requires class User {
private String password;
private List<Identity> identities;
class Identity {
enum Type { Facebook, Google }
Type type;
String email;
}
} |
Interesting... I wonder how we could extend the DSL without overcomplicating this... Overloading put / post / etc. would be an option, but would require to add too many methods... Maybe doing something such as: Rest.one("auth")
.put(body)
.as(User.class)
.request(); The problem would be the order of the verb call ( On the other hand, got Maybe overloading the verb methods is the way forward... I certainly need to think this over. Your input is welcomed! |
This is a suggestion mixed with a question.
I would like to POST and parse the returned request. Something along the lines:
However this is currently impossible because the body and the parsed response are coupled. A decouple would be nice.
Is it possible to achieve what I'm seeking with volley-requests?
The text was updated successfully, but these errors were encountered: