Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "httpStatus"

Index

Object literals

Const httpStatusCode

httpStatusCode: object

clientError

clientError: object

The client screwed up.

BAD_REQUEST

BAD_REQUEST: number = 400

The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications. For example the JSON body could not be parsed.

CONFLICT

CONFLICT: number = 409

The request was understood, and semantically correct, but conflicts with the current state. For example: the type is locked.

EXPECTATION_FAILED

EXPECTATION_FAILED: number = 417

The expectation given in the request's Expect header field could not be met.

FORBIDDEN

FORBIDDEN: number = 403

The user is authenticated but does not have permission.

GONE

GONE: number = 410

Access to the target resource is no longer available at the origin server and this condition is likely to be permanent.

The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable and that the server owners desire that remote links to that resource be removed.

LENGTH_REQUIRED

LENGTH_REQUIRED: number = 411

The server refuses to accept the request without a defined Content-Length.

METHOD_NOT_ALLOWED

METHOD_NOT_ALLOWED: number = 405

The resource does not support the given method. The origin server MUST generate an Allow header field containing a list of the supported methods.

NOT_ACCEPTABLE

NOT_ACCEPTABLE: number = 406

The target resource does not have a current representation that would be acceptable to the user agent, according to the proactive negotiation header fields received in the request.

NOT_FOUND

NOT_FOUND: number = 404

The requested resource was not found.

PAYLOAD_TOO_LARGE

PAYLOAD_TOO_LARGE: number = 413

The request is larger than the server is willing or able to process.

REQUESTED_RANGE_NOT_SATISFIABLE

REQUESTED_RANGE_NOT_SATISFIABLE: number = 416

The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.

TOO_MANY_REQUESTS

TOO_MANY_REQUESTS: number = 429

The user has sent too many requests in a given amount of time.

UNAUTHORIZED

UNAUTHORIZED: number = 401

Authentication is required and the user is not logged in.

UNPROCESSABLE_ENTITY

UNPROCESSABLE_ENTITY: number = 422

The request is syntactically correct, but contains semantic errors. For example a string was expected but got a number.

see

https://tools.ietf.org/html/rfc4918#section-11.2

UNSUPPORTED_MEDIA_TYPE

UNSUPPORTED_MEDIA_TYPE: number = 415

The request type has a media type which the server or resource does not support.

redirect

redirect: object

Status codes for redirect. Pay special attention to which one is used because they have subtle differences in browser and search engine behavior.

FOUND

FOUND: number = 302

The resource moved temporarily. Browsers will change POST to GET on redirect. Search engines will not update their index.

Include a Location header field in the response.

MOVED_PERMANENTLY

MOVED_PERMANENTLY: number = 301

The resource moved permanently. Browsers will change POST to GET on redirect. Search engines will update their index.

Include a Location header field in the response.

MULTIPLE_CHOICES

MULTIPLE_CHOICES: number = 300

The target resource has more than one representation, each with its own more specific identifier, and information about the alternatives is being provided so that the user (or user agent) can select a preferred representation by redirecting its request to one or more of those identifiers.

NOT_MODIFIED

NOT_MODIFIED: number = 304

Cache hit. No content is sent. This is determined by the request headers If-Modified-Since or If-None-Match.

PERMANENT_REDIRECT

PERMANENT_REDIRECT: number = 308

The resource moved permanently and browsers should resubmit, preserving the method and body. Don't use for GET. Search engines will not update their index.

Include a Location header field in the response.

SEE_OTHER

SEE_OTHER: number = 303

The server is redirecting the user agent to a different resource, as indicated by a URI in the Location header field, which is intended to provide an indirect response to the original request.

TEMPORARY_REDIRECT

TEMPORARY_REDIRECT: number = 307

The resource moved temporarily and browsers should resubmit, preserving the method and body. Don't use for GET. Search engines will update their index.

Include a Location header field in the response.

serverError

serverError: object

The server screwed up.

BAD_GATEWAY

BAD_GATEWAY: number = 502

Received an invalid response from an inbound server it accessed while acting as a proxy.

GATEWAY_TIMEOUT

GATEWAY_TIMEOUT: number = 504

Did not receive a timely response from an upstream server while acting as a proxy.

INTERNAL_SERVER_ERROR

INTERNAL_SERVER_ERROR: number = 500

Generic server-side error.

NOT_IMPLEMENTED

NOT_IMPLEMENTED: number = 501

Usually implies future availability.

SERVICE_UNAVAILABLE

SERVICE_UNAVAILABLE: number = 503

A service is temporarily down.

success

success: object

Status codes for successful responses.

ACCEPTED

ACCEPTED: number = 202

The request has been accepted for processing, but the processing has not been completed. The primary resource created by the request is identified by either a Location header field in the response or, if no Location field is received, by the effective request URI.

CREATED

CREATED: number = 201

The request has been fulfilled and has resulted in one or more new resources being created.

NON_AUTHORITATIVE_INFORMATION

NON_AUTHORITATIVE_INFORMATION: number = 203

The request was successful but the enclosed payload has been modified from that of the origin server's 200 (OK) response by a transforming proxy.

NO_CONTENT

NO_CONTENT: number = 204

The server has successfully fulfilled the request and there is no content to send in the response payload body.

OK

OK: number = 200

The request has succeeded. The payload depends on the request method.

GET a representation of the target resource,

HEAD the same representation as GET, but without the representation data,

POST a representation of the status of, or results obtained from, the action,

PUT, DELETE a representation of the status of the action,

OPTIONS a representation of the communications options,

TRACE a representation of the request message as received by the end server.

RESET_CONTENT

RESET_CONTENT: number = 205

The server has fulfilled the request and desires that the user agent reset the "document view", which caused the request to be sent, to its original state as received from the origin server.

Const httpStatusString

httpStatusString: object

200

200: string = "OK"

201

201: string = "Created"

202

202: string = "Accepted"

203

203: string = "Non Authoritative Info"

204

204: string = "No Content"

205

205: string = "Reset Content"

206

206: string = "Partial Content"

207

207: string = "Multi Status"

208

208: string = "Already Reported"

226

226: string = "IM Used"

300

300: string = "Multiple Choices"

301

301: string = "Moved Permanently"

302

302: string = "Found"

303

303: string = "See Other"

304

304: string = "Not Modified"

305

305: string = "Use Proxy"

307

307: string = "Temporary Redirect"

308

308: string = "Permanent Redirect"

400

400: string = "Bad Request"

401

401: string = "Unauthorized"

402

402: string = "Payment Required"

403

403: string = "Forbidden"

404

404: string = "Not Found"

405

405: string = "Method Not Allowed"

407

407: string = "Proxy Auth Required"

408

408: string = "Request Timeout"

409

409: string = "Conflict"

410

410: string = "Gone"

411

411: string = "Length Required"

412

412: string = "Precondition Failed"

413

413: string = "Payload Too Large"

414

414: string = "Request URI Too Long"

415

415: string = "Unsupported Media Type"

416

416: string = "Range Not Satisfiable"

417

417: string = "Expectation Failed"

422

422: string = "Unprocessable Entity"

423

423: string = "Locked"

424

424: string = "Failed Dependency"

426

426: string = "Upgrade Required"

428

428: string = "Precondition Required"

429

429: string = "Too Many Requests"

431

431: string = "Request Header Fields Too Large"

451

451: string = "Unavailable For Legal Reasons"

500

500: string = "Internal Server Error"

501

501: string = "Not Implemented"

502

502: string = "Bad Gateway"

503

503: string = "Service Unavailable"

504

504: string = "Gateway Timeout"

505

505: string = "HTTP Version Not Supported"

506

506: string = "Variant Also Negotiates"

507

507: string = "Insufficient Storage"

508

508: string = "Loop Detected"

510

510: string = "Not Extended"

511

511: string = "Network Authentication Required"

Generated using TypeDoc