Skip to content
This repository has been archived by the owner on Apr 5, 2022. It is now read-only.

Not sending body with RestTemplate DELETE #37

Open
steviemo opened this issue Aug 3, 2017 · 2 comments
Open

Not sending body with RestTemplate DELETE #37

steviemo opened this issue Aug 3, 2017 · 2 comments

Comments

@steviemo
Copy link

steviemo commented Aug 3, 2017

Hey we are creating an exchange DELETE request with object entity as the body of the request however no body is being received by our API server side:

final HttpHeaders headers = new HttpHeaders();
restTemplate.exchange(
                "/api/example",
                HttpMethod.DELETE,
                new HttpEntity<>(entity, headers),
                Void.class);

This works ok with RestTemplate in main spring project - has this functionality been missed for android RestTemplate?
Thanks,
Stephen

@jnrcorp
Copy link

jnrcorp commented Aug 7, 2019

I am having this problem to. The current work around is:

https://stackoverflow.com/questions/36899641/resttemplate-delete-with-body

@jnrcorp
Copy link

jnrcorp commented Aug 7, 2019

I created this PR to add support:

#49

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

2 participants