510 Not Extended
The request needs further extensions for the server to fulfill it.
When and Why to Use It
Section titled “When and Why to Use It”Rare. Use this if your server requires specific HTTP extensions to fulfill a request, and the client failed to declare them.
Usage Examples
Section titled “Usage Examples”import { HttpException, get } from 'shokupan';
export const getResource = get('/resource', () => { throw new HttpException('Not Extended', 510);});import { Controller, Get, HttpException } from 'shokupan';
@Controller('/api')export class ExampleController { @Get('/resource') getResource() { throw new HttpException('Not Extended', 510); }}import express from 'express';const app = express();
app.get('/resource', (req, res) => { res.status(510).json({ error: 'Not Extended' });});import { Controller, Get, HttpException } from '@nestjs/common';
@Controller('api')export class ExampleController { @Get('resource') getResource() { throw new HttpException('Not Extended', 510); }}import Koa from 'koa';const app = new Koa();
app.use(async ctx => { if (ctx.path === '/resource' && ctx.method === 'GET') { ctx.status = 510; ctx.body = { error: 'Not Extended' }; }});