What is the unit of value returned by the expectedContentLength function

I am trying to set a data limit when making connections. I use the following function to get the size NSURLResponse.

   NSURLResponse *response;
  long long size = [response expectedContentLength];

I get the size as: 15219

Is it bytes or bits?

0
source share
1 answer

expectedContentLengthset when the server provides it, for example, with a response header Content-Length.

Content-Length determined by :

The Content-Length entity-header field indicates the size of the entity-body, in decimal OCTETs sent to the recipient or in the case of the HEAD method, the size of the body of the object that was sent if the request was GET.

, - , 8 .

+2

Source: https://habr.com/ru/post/1017042/


All Articles