Build 589089stable
Module 531679
884 characters · in 52082.07941602b067c1b4.jsDependencies
Source Raw
function(t,e,r){"use strict";let o=r(17101);function n(){}t.exports=n,n.prototype.get=function(t){return this.header[t.toLowerCase()]},n.prototype._setHeaderProperties=function(t){let e=t["content-type"]||"";this.type=o.type(e);let r=o.params(e);for(let t in r)Object.prototype.hasOwnProperty.call(r,t)&&(this[t]=r[t]);this.links={};try{t.link&&(this.links=o.parseLinks(t.link))}catch(t){}},n.prototype._setStatusProperties=function(t){let e=Math.trunc(t/100);this.statusCode=t,this.status=this.statusCode,this.statusType=e,this.info=1===e,this.ok=2===e,this.redirect=3===e,this.clientError=4===e,this.serverError=5===e,this.error=(4===e||5===e)&&this.toError(),this.created=201===t,this.accepted=202===t,this.noContent=204===t,this.badRequest=400===t,this.unauthorized=401===t,this.notAcceptable=406===t,this.forbidden=403===t,this.notFound=404===t,this.unprocessableEntity=422===t}}