setting content-length before sending request
logging