2019-01-02 00:00:53 +00:00
|
|
|
import { HttpStatus, TStatusGroup } from './smartstatus.classes.http';
|
2017-04-10 15:11:42 +00:00
|
|
|
|
2019-01-02 01:08:12 +00:00
|
|
|
export class Status200 extends HttpStatus {
|
2019-01-02 00:00:53 +00:00
|
|
|
constructor() {
|
|
|
|
super({
|
|
|
|
code: 200,
|
|
|
|
text: 'OK',
|
|
|
|
description: `Standard response for successful HTTP requests.
|
2017-04-10 15:11:42 +00:00
|
|
|
The actual response will depend on the request method used.
|
|
|
|
In a GET request, the response will contain an entity corresponding to the requested resource.
|
2021-08-16 13:36:41 +00:00
|
|
|
In a POST request, the response will contain an entity describing or containing the result of the action.`,
|
2019-01-02 00:00:53 +00:00
|
|
|
});
|
2017-04-10 15:11:42 +00:00
|
|
|
}
|
|
|
|
}
|
2019-01-02 01:08:12 +00:00
|
|
|
HttpStatus.addStatus('200', Status200);
|
2017-04-10 15:11:42 +00:00
|
|
|
|
2019-01-02 01:08:12 +00:00
|
|
|
// tslint:disable-next-line: max-classes-per-file
|
|
|
|
export class Status201 extends HttpStatus {
|
2019-01-02 00:00:53 +00:00
|
|
|
constructor() {
|
|
|
|
super({
|
|
|
|
code: 201,
|
|
|
|
text: 'Created',
|
2021-08-16 13:36:41 +00:00
|
|
|
description: `The request has been fulfilled, resulting in the creation of a new resource.`,
|
2019-01-02 00:00:53 +00:00
|
|
|
});
|
2017-04-11 09:10:15 +00:00
|
|
|
}
|
|
|
|
}
|
2019-01-02 01:08:12 +00:00
|
|
|
HttpStatus.addStatus('201', Status201);
|
2017-04-11 09:10:15 +00:00
|
|
|
|
2019-01-02 01:08:12 +00:00
|
|
|
// tslint:disable-next-line: max-classes-per-file
|
|
|
|
export class Status202 extends HttpStatus {
|
2019-01-02 00:00:53 +00:00
|
|
|
constructor() {
|
|
|
|
super({
|
|
|
|
code: 202,
|
|
|
|
text: 'Accepted',
|
|
|
|
description: `The request has been accepted for processing, but the processing has not been completed.
|
2021-08-16 13:36:41 +00:00
|
|
|
The request might or might not be eventually acted upon, and may be disallowed when processing occurs.`,
|
2019-01-02 00:00:53 +00:00
|
|
|
});
|
2017-04-10 15:11:42 +00:00
|
|
|
}
|
|
|
|
}
|
2019-01-02 01:08:12 +00:00
|
|
|
HttpStatus.addStatus('202', Status202);
|
2017-04-10 15:11:42 +00:00
|
|
|
|
2019-01-02 01:08:12 +00:00
|
|
|
// tslint:disable-next-line: max-classes-per-file
|
|
|
|
export class Status203 extends HttpStatus {
|
2019-01-02 00:00:53 +00:00
|
|
|
constructor() {
|
|
|
|
super({
|
|
|
|
code: 203,
|
|
|
|
text: 'Non-Authoritative Information',
|
|
|
|
description: `The server is a transforming proxy (e.g. a Web accelerator)
|
2021-08-16 13:36:41 +00:00
|
|
|
that received a 200 OK from its origin, but is returning a modified version of the origin's response.`,
|
2019-01-02 00:00:53 +00:00
|
|
|
});
|
2017-04-10 15:11:42 +00:00
|
|
|
}
|
|
|
|
}
|
2019-01-02 01:08:12 +00:00
|
|
|
HttpStatus.addStatus('203', Status203);
|
2017-04-10 15:11:42 +00:00
|
|
|
|
2019-01-02 01:08:12 +00:00
|
|
|
// tslint:disable-next-line: max-classes-per-file
|
|
|
|
export class Status204 extends HttpStatus {
|
2019-01-02 00:00:53 +00:00
|
|
|
constructor() {
|
|
|
|
super({
|
|
|
|
code: 204,
|
|
|
|
text: 'Non-Authoritative Information',
|
2021-08-16 13:36:41 +00:00
|
|
|
description: `The server successfully processed the request and is not returning any content.`,
|
2019-01-02 00:00:53 +00:00
|
|
|
});
|
2017-04-10 15:11:42 +00:00
|
|
|
}
|
|
|
|
}
|
2019-01-02 01:08:12 +00:00
|
|
|
HttpStatus.addStatus('204', Status204);
|
2017-04-10 15:11:42 +00:00
|
|
|
|
2019-01-02 01:08:12 +00:00
|
|
|
// tslint:disable-next-line: max-classes-per-file
|
|
|
|
export class Status205 extends HttpStatus {
|
2019-01-02 00:00:53 +00:00
|
|
|
constructor() {
|
|
|
|
super({
|
|
|
|
code: 205,
|
|
|
|
text: 'Reset Content',
|
|
|
|
description: `The server successfully processed the request, but is not returning any content.
|
2021-08-16 13:36:41 +00:00
|
|
|
Unlike a 204 response, this response requires that the requester reset the document view.`,
|
2019-01-02 00:00:53 +00:00
|
|
|
});
|
2017-04-10 15:11:42 +00:00
|
|
|
}
|
|
|
|
}
|
2019-01-02 01:08:12 +00:00
|
|
|
HttpStatus.addStatus('205', Status205);
|
2017-04-10 15:11:42 +00:00
|
|
|
|
2019-01-02 01:08:12 +00:00
|
|
|
// tslint:disable-next-line: max-classes-per-file
|
|
|
|
export class Status206 extends HttpStatus {
|
2019-01-02 00:00:53 +00:00
|
|
|
constructor() {
|
|
|
|
super({
|
|
|
|
code: 206,
|
|
|
|
text: 'Partial Content',
|
|
|
|
description: `The server is delivering only part of the resource (byte serving)
|
2017-04-10 15:11:42 +00:00
|
|
|
due to a range header sent by the client.
|
|
|
|
The range header is used by HTTP clients to enable resuming of interrupted downloads,
|
2021-08-16 13:36:41 +00:00
|
|
|
or split a download into multiple simultaneous streams.`,
|
2019-01-02 00:00:53 +00:00
|
|
|
});
|
2017-04-10 15:11:42 +00:00
|
|
|
}
|
|
|
|
}
|
2019-01-02 01:08:12 +00:00
|
|
|
HttpStatus.addStatus('206', Status206);
|
2017-04-10 15:11:42 +00:00
|
|
|
|
2019-01-02 01:08:12 +00:00
|
|
|
// tslint:disable-next-line: max-classes-per-file
|
|
|
|
export class Status207 extends HttpStatus {
|
2019-01-02 00:00:53 +00:00
|
|
|
constructor() {
|
|
|
|
super({
|
|
|
|
code: 207,
|
|
|
|
text: 'Multi-Status',
|
|
|
|
description: `The message body that follows is an XML message
|
2017-04-10 15:11:42 +00:00
|
|
|
and can contain a number of separate response codes,
|
2021-08-16 13:36:41 +00:00
|
|
|
depending on how many sub-requests were made.`,
|
2019-01-02 00:00:53 +00:00
|
|
|
});
|
2017-04-10 15:11:42 +00:00
|
|
|
}
|
|
|
|
}
|
2019-01-02 01:08:12 +00:00
|
|
|
HttpStatus.addStatus('207', Status207);
|
2017-04-10 15:11:42 +00:00
|
|
|
|
2019-01-02 01:08:12 +00:00
|
|
|
// tslint:disable-next-line: max-classes-per-file
|
|
|
|
export class Status208 extends HttpStatus {
|
2019-01-02 00:00:53 +00:00
|
|
|
constructor() {
|
|
|
|
super({
|
|
|
|
code: 208,
|
|
|
|
text: 'Already Reported',
|
|
|
|
description: `The members of a DAV binding have already been enumerated
|
2017-04-10 15:11:42 +00:00
|
|
|
in a preceding part of the (multistatus) response,
|
2021-08-16 13:36:41 +00:00
|
|
|
and are not being included again.`,
|
2019-01-02 00:00:53 +00:00
|
|
|
});
|
2017-04-10 15:11:42 +00:00
|
|
|
}
|
|
|
|
}
|
2019-01-02 01:08:12 +00:00
|
|
|
HttpStatus.addStatus('208', Status208);
|
2017-04-10 15:11:42 +00:00
|
|
|
|
2019-01-02 01:08:12 +00:00
|
|
|
// tslint:disable-next-line: max-classes-per-file
|
|
|
|
export class Status226 extends HttpStatus {
|
2019-01-02 00:00:53 +00:00
|
|
|
constructor() {
|
|
|
|
super({
|
|
|
|
code: 226,
|
|
|
|
text: 'IM Used',
|
|
|
|
description: `The server has fulfilled a request for the resource,
|
2017-04-10 15:11:42 +00:00
|
|
|
and the response is a representation of the result of one or more instance-manipulations
|
2021-08-16 13:36:41 +00:00
|
|
|
applied to the current instance.`,
|
2019-01-02 00:00:53 +00:00
|
|
|
});
|
2017-04-10 15:11:42 +00:00
|
|
|
}
|
2017-04-11 09:30:03 +00:00
|
|
|
}
|
2019-01-02 01:08:12 +00:00
|
|
|
HttpStatus.addStatus('226', Status226);
|