validators/success/is-created.js

import validateHttpStatus from '../validate-http-status';

/**
 * @description
 * Validate HTTP Status code 201 type SUCCESS
 *
 * @param {Integer} statusCode - The HTTP Status code
 * @return {Boolean}
 * @throws {HTTPStatusError} When the statusCode is different then 201
 */
function isCreated(statusCode) {
  return validateHttpStatus(statusCode, 201);
}

export default isCreated;

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy