I tried to cache a POST request in a service worker on fetch event.
cache.put(event.request, response), but the returned promise was rejected with
TypeError: Invalid request method POST..
When I tried to hit the same POST API,
caches.match(event.request) was giving me undefined.
But when I did the same for GET methods, it worked:
caches.match(event.request) for a GET request was giving me a response.
Can service workers cache POST requests?
In case they can't, what approach can we use to make apps truly offline?