Created
July 3, 2013 20:47
-
-
Save ZavenArra/5922670 to your computer and use it in GitHub Desktop.
Login request object Android Spring
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LoginRequest extends SpringAndroidSpiceRequest< LoginUser > { | |
String uri; | |
public LoginRequest(String email) { | |
super(LoginUser.class); | |
uri = ApiSettings.API_BASE_URI + "attendees/search/" + email; | |
} | |
@Override | |
public LoginUser loadDataFromNetwork() throws Exception { | |
RestTemplate restTemplate = getRestTemplate(); | |
restTemplate.setRequestFactory(new HttpComponentsClientHttpRequestFactory()); | |
return restTemplate.getForObject( uri, LoginUser.class ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment