UNPKG

x-http-client

Version:

An http client to simplify sending requests (HTTP & JSONP) in the browser.

18 lines (14 loc) 485 B
var ResponseError = require('./ResponseError'); var inherits = require('../shared/inherits'); var addMixin = require('../shared/addMixin'); /** * @class * @param {string} code The error code. * @param {HttpRequest} request The http request. */ function HttpResponseError(code, request) { ResponseError.call(this, code, request); addMixin(this, request.options, 'httpResponseErrorMixin'); } inherits(HttpResponseError, ResponseError); module.exports = HttpResponseError;