Answer the question
In order to leave comments, you need to log in
How to cut the data in a variable by the number of bytes?
In general, the question is not an easy one.
I'm using curl and don't want to disable headers.
Therefore, the response from the server comes in the form of a header + body. The
body can be either text or a picture or a binary.
Status Code: 200
Headers: [ { result: { version: 'HTTP/1.1', code: 200, reason: 'OK' },
Server: 'nginx',
Date: 'Tue, 25 Sep 2018 09:16:20 GMT',
'Content-Type': 'image/png',
'Content-Length': '1727',
Connection: 'close',
'Last-Modified': 'Thu, 21 Dec 2017 23:49:29 GMT',
ETag: '"5a3c4889-6bf"',
Expires: 'Sat, 24 Nov 2018 09:16:20 GMT',
'Cache-Control': 'public, max-age=5184000',
'Access-Control-Allow-Origin': '*',
'Accept-Ranges': 'bytes' } ]
Headers length: 1
Body length: 2061
METHOD: GET
Header length: 371
var body = 'header+body';
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question