Compare commits

..

No commits in common. "6159cd56b86a504f8db89052d6ea4fea9d6a5836" and "c67d0d25a212d43bd30dc12570208ca9db033efb" have entirely different histories.

2 changed files with 2 additions and 4 deletions

View File

@ -3,7 +3,7 @@ A port of the EventStore .Net ClientAPI to Node.js
## Learning
If you want to learn more about EventSourcing/EventModeling, you can join one of the monthly virtual workshops offered by my employer Adaptech Group, see info at [https://adaptechgroup.com/#workshop](https://adaptechgroup.com/#workshop).
If you want to learn more about EventSourcing/CQRS/EventModeling, you can join the virtual workshop offered by my employer Adaptech Group, see info at [https://www.adaptechgroup.com/virtual-workshop/](https://www.adaptechgroup.com/virtual-workshop/).
## Status

View File

@ -1,5 +1,4 @@
const http = require('http');
const https = require('https');
const url = require('url');
const util = require('util');
const ProjectionCommandFailedError = require('../errors/projectionCommandFailedError');
@ -113,7 +112,6 @@ ProjectionsClient.prototype.delete = function(httpEndPoint, name, deleteEmittedS
ProjectionsClient.prototype.request = function(method, _url, data, userCredentials, expectedCode) {
const options = url.parse(_url);
const httplib = options.protocol === 'https:' ? https : http;
options.method = method;
if (userCredentials) {
options.auth = [userCredentials.username, userCredentials.password].join(':');
@ -123,7 +121,7 @@ ProjectionsClient.prototype.request = function(method, _url, data, userCredentia
const timeout = setTimeout(function () {
reject(new Error(util.format('Request timed out for %s on %s', method, _url)))
}, self._operationTimeout);
const req = httplib.request(options, function (res) {
const req = http.request(options, function (res) {
const hasExpectedCode = res.statusCode === expectedCode;
var result = '';
res.setEncoding('utf8');