November 2018
Intermediate to advanced
346 pages
8h 12m
English
Stopping short is the process of discontinuing the processing request (before it would otherwise finish) based on an external signal.
In our case, that external signal will be the cancelation of the user's HTTP request. In Go, the http.Request object includes a Context() method; the following is an extract of the documentation for that method:
What does it mean when the request is canceled? Most importantly for us, it means that no one is waiting for the response.
If the user has given up listening to the response, it is likely they will consider the request failed ...
Read now
Unlock full access