See https://stackoverflow.com/questions/70605030/modify-post-request-body-in-service-worker

This will POST to https://httpbin.org/#/Anything/post_anything, intercepted and modified by a service worker, and then display the echo'ed response.

Response: