306 Switch Proxy
No longer used, originally meant to tell a client to switch proxies.
When and Why to Use It
Section titled “When and Why to Use It”Do not use this. It is no longer used.
Usage Examples
Section titled “Usage Examples”import { HttpCode, get } from 'shokupan';
export const getResource = get('/resource', () => { return { message: 'Switch Proxy' };}).pipe(HttpCode(306));import { Controller, Get, HttpCode } from 'shokupan';
@Controller('/api')export class ExampleController { @Get('/resource') @HttpCode(306) getResource() { return { message: 'Switch Proxy' }; }}import express from 'express';const app = express();
app.get('/resource', (req, res) => { res.status(306).json({ message: 'Switch Proxy' });});import { Controller, Get, HttpCode } from '@nestjs/common';
@Controller('api')export class ExampleController { @Get('resource') @HttpCode(306) getResource() { return { message: 'Switch Proxy' }; }}import Koa from 'koa';const app = new Koa();
app.use(async ctx => { if (ctx.path === '/resource' && ctx.method === 'GET') { ctx.status = 306; ctx.body = { message: 'Switch Proxy' }; }});