get the byte length of a response