Skip to content

411 Length Required

The server refuses to accept the request without a defined Content-Length header.

Use this if your server strictly requires a Content-Length header to allocate memory, and the client failed to provide one.

import { HttpException, get } from 'shokupan';
export const getResource = get('/resource', () => {
throw new HttpException('Length Required', 411);
});