0

I am working on some Java backend services. One of the issue I have is that after calling downstream PUT API, I get 200/204 Response object. After that I need to return same response to upstream service. From what I am reading from docs that I need to close response object otherwise it won't relinquish resources (Http Connection, files etc.). But Can we return the closed response object to upstream service ?.

user2331262
  • 45
  • 1
  • 5
  • Are you asking how to return status `204 No Content` from a Spring Controller method? – Andreas Apr 23 '21 at 20:25
  • You need to show some code, e.g. the code calling the downstream service, so we can see the API call you use and the object type you get back, and you need to explain why you can't take that response *content* yourself and return it from your own controller method. – Andreas Apr 23 '21 at 20:28
  • [This might help you understand your situation](https://stackoverflow.com/a/36949363/2587435) – Paul Samsotha Apr 23 '21 at 23:23

0 Answers0