Skip to content

426 Upgrade Required

You need to switch to a different, usually newer or more secure, protocol (like upgrading to TLS 1.3 or HTTP/2).

Use this if you force clients to use WebSockets, or force them to upgrade from HTTP/1.1 to HTTP/2.

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