5
Client
sends a post bodiless to any API
post('api.dominio.com')
Server
returns only 204 status code
return res.status(204)
Assuming the above situation happens, the client makes a request without sending anything (practically a GET), and the server knowing that when that endpoit is requested, must do something and in the end only answer 204, without returning anything else. In this request, the user spent data?
I don’t know if I’m being clear, but my question is more about the HTTP protocol, what is the minimum cost of it? a Status Code consumes data?
Consume yes, even if very little. However there was no lack of communication with the server, pass through the routers to it, request processing, sending the response... There is always consumption. Now, if it was something that affects application performance, then only if the server’s bandwidth and processing is low and the requests are made in thousands at the same time. Same time, I mean, in, say, 10 thousandths of a second, for example... I would like to see a test that can capture how many bytes it consumes in communication, out of curiosity too...
– Rodrigo Tognin
@Rodrigotognin Will depend on the amount of headers from the request/response.
– Jéf Bueno
@Rodrigotognin answered the question with an example and an approximate measure of the request
– nullptr