Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
public class MyRequest extends SpringAndroidSpiceRequest<MyResponse> {
public MyRequest(){
public MyResponse loadDataFromNetwork() throws Exception {
MultiValueMap<String, String> parameters = new LinkedMultiValueMap<String, String>();
parameters.set("foo", "bar");
HttpHeaders headers = new HttpHeaders();
HttpEntity<MultiValueMap<String, String>> request = new HttpEntity<MultiValueMap<String, String>>(parameters, headers);
return getRestTemplate().postForObject("", request, MyResponse.class);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.