Answer the question
In order to leave comments, you need to log in
How to get part of the response to an http request?
The server sends 200kb of data via http to a get request. How can I get 20kb of answer? I don't need the whole answer, but I need to save traffic.
Answer the question
In order to leave comments, you need to log in
Write a script that will open the socket on its own, write request headers to it, read the response headers and the first 20 kilobytes, and then close the socket.
in general, no way. the HTTP protocol as such does not provide for reducing the amount of transmitted data if the recipient does not need something.
on the other hand, CURL supports requesting a specific range of bytes via URL, read about the --range
.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question