Hi Ivan,
responses are sent with Transfer-Encoding: chunked header indicating that data is sent in a series of chunks and therefore Content-lenght header is not sent at all - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Transfer-Encoding#Directives
Since the request body is JSON, you may stringify the body and get its length. If the JSON contains only ASCII characters (1 character is 1 byte), then the stringified length would correctly represent the content length.
Let me know if this has helped.
Ivan