in reply to Re^4: Split file, first 30 lines only
in thread Split file, first 30 lines only
Ranges are documented in section 14.35 of the HTTP RFC. They allow an HTTP client to request only part (or parts) of the resource which would ordinarily be retrieved in full (or in server-chosen chunks) from the server.
The RFC only mandates byte-count ranges so you should use that instead of lines in order to be portable. However if you are after the first 30 lines of a 50,000 line response then just pick a large enough byte range that you will likely retrieve at least your 30 lines and if fewer lines are returned you can issue subsequent requests until you have all the data you require.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: Split file, first 30 lines only (HTTP Ranges and :read_size_hint)
by Discipulus (Canon) on Mar 02, 2017 at 10:28 UTC | |
by hippo (Archbishop) on Aug 23, 2017 at 10:46 UTC | |
by wrkrbeee (Scribe) on Mar 02, 2017 at 16:07 UTC | |
|
Re^6: Split file, first 30 lines only (HTTP Ranges)
by wrkrbeee (Scribe) on Mar 02, 2017 at 16:07 UTC |