The handler func is called when the client calls this endpoint, *by
definition* of what a handler function is.
Depending on how your application is designed, you can either do work in
the handler func, or you can make a note that some work needs to be done
(for example, by putting a message in
It means in the body of func/handler responsible for this POST Endpoint I
pack the necessary actions and each time client calls this endpoint those
actions will be also executed.
Then I do not need to check regularly when called this endpoint of server.
Sorry for my naivety
Am Di., 7. Dez. 2021
> And this POST endpoint should be checked regularly to see when the
changes happened? As by each change the server does some action.
No, that's not how webservers work.
Regardless of the language you are using: you write some code which handles
the POST and returns a status code (and possibly
And this POST endpoint should be checked regularly to see when the changes
happened? As by each change the server does some action.
As the server immediately after each POST request from client, need to do
some action. How guarantee this in Go?
Am Di., 7. Dez. 2021 um 14:11 Uhr schrieb Brian Candl
If the client is notifying the server of changes, then it can just make a
HTTP POST to a server endpoint. Your server just needs to implement that
endpoint to receive the POST request.
If the server wants to notify the client of changes in real time, there are
various approaches: e.g. Websocke