# @ResponseStatus

## Main

As we have described [before](https://mandarineframework.gitbook.io/mandarine-ts/mandarine-mvc/controllers/using-routes-and-http-handlers#declaring-routes), you **can** specify the response status for a specific endpoint by using the `options`argument in its the *route decorator.* Although, it is also possible to specify a response status at a *controller level*, this means, it will be applied to all your endpoints inside your controller. This is achieved by using the `@ResponseStatus` decorator.

## Usage

**Syntax:**

```typescript
@ResponseStatus(httpCode: Mandarine.MandarineMVC.HttpStatusCode)
```

The `@ResponseStatus` decorator must always be located at a class level, otherwise it will have no effect.

Example:

```typescript
import { Controller, ResponseStatus } from "https://deno.land/x/mandarinets/mod.ts";

@Controller()
@ResponseStatus(Mandarine.MandarineMVC.HttpStatusCode.OK)
export class MyController {
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mandarineframework.gitbook.io/mandarine-ts/v1.0.1/mandarine-mvc/controllers/responsestatus.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
