-
Notifications
You must be signed in to change notification settings - Fork 8
ByteRangeRequests
Some of our endpoints support byte range requests. Endpoints that support byte range requests will advertise this feature by returning an Accept-Ranges header.
Clients may wish to request byte ranges from endpoints that support this feature. To determine if an endpoint support byte range requests, the client should issue a HEAD (or GET) request to the endpoint. If the response advertises an Accept-Ranges header, then it supports byte range requests.
The following example illustrates how to make byte range requests to an endpoint (assuming a content length of 10000 bytes).
- The client issues a HEAD request to the endpoint to determine if it supports range requests.
HEAD /files/documents/versions/123/previews/video/content/ HTTP/1.1
Authorization: OAuth2 frootymcnooty/vonbootycherooty
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 10000
Content-Type: video/mp4
- The client issues a byte range request to the endpoint by making a GET request with a Range header.
GET /files/documents/versions/123/previews/video/content/ HTTP/1.1
Authorization: OAuth2 frootymcnooty/vonbootycherooty
Range: bytes=500-999
When an endpoint that supports byte range requests receives a valid byte range request, it will return a 206 Partial Content response.
HTTP/1.1 206 Partial Content
Accept-Ranges: bytes
Content-Range: bytes 500-999/10000
Content-Length: 500
Content-Type: video/mp4
[[partial binary content]]
If the client sends a syntactically invalid Range header, the endpoint will ignore the Range header entirely and return a 200 OK full content response. This conforms to RFC 2616 Section 14.35.1.
GET /files/documents/versions/123/previews/video/content/ HTTP/1.1
Authorization: OAuth2 frootymcnooty/vonbootycherooty
Range: bytes=999-500
HTTP/1.1 200 OK
Accept-Ranges: bytes
Content-Length: 10000
Content-Type: video/mp4
[[full binary content]]
If the client requests a range that is not satisfiable, the endpoint will return a 416 Requested Range Not Satisfiable response.
GET /files/documents/versions/123/previews/video/content/ HTTP/1.1
Authorization: OAuth2 frootymcnooty/vonbootycherooty
Range: bytes=10001-10500
HTTP/1.1 416 Requested Range Not Satisfiable
Content-Range: bytes */10000
The Huddle API does not currently support multiple range requests on any of its endpoints. If a multiple range request is received, the endpoint will return a 403 Forbidden response.
- Basic concepts
-
Resources
- Actor
- Approvals
- BulkProcess
- Calendar
- Membership
- Company
- Document
- Document library settings
- Folder
- Paged Folder
- Pins
- Integrations
- Form
- Friends
- Invitation
- Link
- Document Lock
- Folder Lock
- Localisation
- MemberAutocomplete
- Notifications
- Offline item
- PeopleBulkProcess
- Permissions
- Presence
- PublishedDocuments
- Recents
- Recommendations
- Recycle Bin
- Search
- Share
- Tasks (Todos), File Requests, Approvals
- Tasks on Documents
- Actions
- UserApprovals
- User
- VersionHistory
- Workspace
- Workspaces
- SamlPartners
- Logout
- Impersonation
- Administration
- WebHooks