I would like to send updates of a running HTTP request to the client to tell it at what stage the request-triggered process currently is.
The process behind the request does currently the following things (in this order):
Client-side:
- Client sends an HTTP Request (upload of a file) to the server
Server-side:
- Takes the uploaded file
- Encrypt it
- Upload it to an archive storage
- Return response to the client (Meanwhile, the client does not know what currently happens)
Client-side:
- Get response and show it to the user
I want to tell the client at what stage the process is, like “Uploading done. Encrypting…” and so on.
Is there a way to realize that, or am I missing something? Is it even possible to do?
Frameworks I'm using:
- Client: Next.js
- Server: Hapi.dev for API development
Thanks