Explain how range requests work with SDK
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 53
- Forks
- 67
- PR merge metrics
- No merged PRs in 30d
Description
This should be a new guide on how to use range requests with the SDK.
Summary:
Seekable downloads and range request support
This release adds seekable streaming downloads and playback via HTTP range requests at http://<streaming_server>/stream/<sd_hash>, as well as new configuration settings streaming_server (default: localhost:5280) and streaming_get (default: True). For convenience, File type api response objects have a new streaming_url string at which the partial content stream can be requested. Only files already in the file manager can be streamed via range requests, if given an sd hash of an unknown stream the server will respond with a 404 error.
Provided thestreaming_get setting is not disabled, new streams can be requested from a claim name and optional claim id at http://<streaming_server>/get/ or http://<streaming_server>/get//<claim_id>. These will internally call the api method get and return an http redirect to the /stream endpoint.
Writing downloads to the file system can now be disabled or enabled by default using the new save_files setting. The existing get command will follow this setting but can be overridden with the new save_file argument.
The added file_save command will explicitly save a file to disk.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the range-request behavior described in the issue, including the /stream and /get endpoints, streaming_url, and file-saving settings. Create a guide explaining seekable downloads, redirects, unknown-stream 404 responses, and the save_file and file_save behavior; done means the documented examples cover the stated configuration and request paths.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100