How to use the http-status.ACCEPTED function in http-status

To help you get started, we’ve selected a few http-status examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github box / box-node-sdk / lib / managers / files.js View on Github external
.then(response => {

			switch (response.statusCode) {

			// 202 - Thumbnail will be generated, but is not ready yet
			// 302 - Thumbnail can not be generated
			// return the url for a thumbnail placeholder
			case httpStatusCodes.ACCEPTED:
			case httpStatusCodes.FOUND:
				return {
					statusCode: response.statusCode,
					location: response.headers.location
				};

				// 200 - Thumbnail image recieved
				// return the thumbnail file
			case httpStatusCodes.OK:
				return {
					statusCode: response.statusCode,
					file: response.body
				};

				// Unexpected Response
			default:
github talyssonoc / node-api-boilerplate / src / interfaces / http / user / UsersController.js View on Github external
.on(SUCCESS, (user) => {
        res
          .status(Status.ACCEPTED)
          .json(userSerializer.serialize(user));
      })
      .on(VALIDATION_ERROR, (error) => {
github talyssonoc / node-api-boilerplate / src / interfaces / http / user / UsersController.js View on Github external
.on(SUCCESS, () => {
        res.status(Status.ACCEPTED).end();
      })
      .on(NOT_FOUND, (error) => {