# Response Decorator

Module
import { Response } from "@tsed/common"
Source/packages/common/src/mvc/decorators/params/response.ts

# Overview

interface Response extends TsED.Response {
}
function Response(): ParameterDecorator;

# Description

Redirect to the given url with optional response status defaulting to 302.

The resulting url is determined by res.location(), so it will play nicely with mounted apps, relative paths, "back" etc.

Examples:

res.redirect('/foo/bar'); res.redirect('http://example.com'); res.redirect(301, 'http://example.com'); res.redirect('http://example.com', 301); res.redirect('../login'); // /blog/post/1 -> /blog/login