# AcceptMime Decorator

Module
import { AcceptMime } from "@tsed/common/src/mvc/decorators/method/acceptMime"
Source/packages/common/src/mvc/decorators/method/acceptMime.ts

# Overview

function AcceptMime(...mimes: string[]): Function;

# Description

Set a mime list which are acceptable and compare it with request Content-Type.

 @Controller('/mypath')
 export class MyCtrl {

   @Get('/')
   @AcceptMime('application/json')
   public getResource(){}
 }
1
2
3
4
5
6
7