I have a special requirement that I want to pass a HttpResponse(from Apache CORE API) object as an extra to another Intent.
Problem:
I have my HTTP server(Apache CORE) running a service S. While I receive a POST request, the response should be sent after execution of an intent A, which sends a Broadcast to my service S already running (which is designed based on my requirement). So I need to handle the HTTP POST response in the Broadcast receiver. Is this possible to do? So, I need the HttpResponse in the handle() method to be sent in the Broadcast receiver and send the response from there. Please let me know if you need more details.
I found links for passing primitive types like String, Integer types etc. Any help is appreciated.
I used a
where
response is the HttpResponse object and httpResponse is the string that serves as an ID for this request. I passed the String between my Activity and the service. Later, retrieved the value of the object (key) using its value (the String value). HttpResponse does not implement Serializable and hence this worked 🙂 Thanks everyone for your replies.