# Decorator Location
Decorator operationModule | import { Location } from "@tsed/schema" |
---|---|
Source | /packages/specs/schema/src/types/decorators/operations/location.ts |
# Overview
function Location(location: string, meta?: JsonHeader): import("./returns").ReturnsChainedDecorators;
# Description
Sets the response Location HTTP header to the specified path parameter.
@Location('/foo/bar', {description: 'Location to the next step'})
@Location('http://example.com')
@Location('back')
private myMethod() {
}
1
2
3
4
5
6
2
3
4
5
6
A path value of “back” has a special meaning, it refers to the URL specified in the Referer
header of the request. If the Referer
header was not specified, it refers to “/”.