@blackglory/http-status
Version:
A class-based HTTP status library
43 lines • 1.19 kB
JavaScript
import { Redirection } from './enum.js';
export class HTTPRedirection {
constructor(code, message) {
this.code = code;
this.message = message;
}
}
export class MultipleChoice extends HTTPRedirection {
constructor() {
super(Redirection.MultipleChoice, 'Multiple Choice');
}
}
export class MovedPermanently extends HTTPRedirection {
constructor() {
super(Redirection.MovedPermanently, 'Moved Permanently');
}
}
export class Found extends HTTPRedirection {
constructor() {
super(Redirection.Found, 'Found');
}
}
export class SeeOther extends HTTPRedirection {
constructor() {
super(Redirection.SeeOther, 'See Other');
}
}
export class NotModified extends HTTPRedirection {
constructor() {
super(Redirection.NotModified, 'Not Modified');
}
}
export class TemporaryRedirect extends HTTPRedirection {
constructor() {
super(Redirection.TemporaryRedirect, 'Temporary Redirect');
}
}
export class PermanentRedirect extends HTTPRedirection {
constructor() {
super(Redirection.PermanentRedirect, 'Permanent Redirect');
}
}
//# sourceMappingURL=http-redirection.js.map