Skip to content

300 Multiple Choices

There are multiple options available for the requested link. Pick one! Useful for serving a video in different formats.

Use this when the client requests a URL that could resolve to multiple different things. For example, requesting a video that is available in 1080p, 720p, or 480p, and letting the client choose.

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