x-http-client
Version:
An http client to make it easier to send requests (including JSONP requests) to the server.
18 lines (14 loc) • 507 B
JavaScript
var ResponseError = require('./ResponseError');
var inherits = require('../shared/inherits');
var addCustomParser = require('../shared/addCustomParser');
/**
* @class
* @param {string} code The error code.
* @param {HttpRequest} request The http request.
*/
function HttpResponseError(code, request) {
ResponseError.call(this, code, request);
addCustomParser(this, request.options, 'httpResponseErrorParser');
}
inherits(HttpResponseError, ResponseError);
module.exports = HttpResponseError;