Skip to content

206 Partial Content

Success, but here is only part of the data. Used for streaming video or resuming paused downloads.

Use this when serving large files (like streaming video). If the client says ‘Give me bytes 1000 to 2000’, you respond with 206 Partial Content and send exactly that chunk.

import { HttpCode, get } from 'shokupan';
export const getResource = get('/resource', () => {
return { message: 'Partial Content' };
}).pipe(HttpCode(206));