Skip to content

308 Permanent Redirect

Like 301, but strictly forces the client to use the exact same HTTP method when following the permanent redirect.

Use this instead of 301 when you want a permanent redirect, but explicitly require the client to use the exact same HTTP method (like keeping a POST as a POST) on the new URL.

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