I had the same question, but then I realized that I really do not care if someone subscribed to the observed one. I just want the POST request to be sent anyway. Here is what I came up with:
postItem(itemData) { var observable = this.http.post('/api/items', itemData) .map(response => response.json())
The request is sent as soon as connect() called. However, it is still observed that the postItem caller can subscribe if required. Since publishReplay() used instead of publish() , subscription is possible even after the POST request is completed.
lex82
source share