Skip to content

Commit 5e1138d

Browse files
author
Hovhannes Babayan
committed
added withCredentials: false
1 parent 0d57b0c commit 5e1138d

3 files changed

Lines changed: 18 additions & 3 deletions

File tree

dist/attask.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6850,9 +6850,16 @@ module.exports = function(Api) {
68506850
//}
68516851

68526852
return new Promise(function (resolve, reject) {
6853+
options = {
6854+
hostname: 'echo.jsontest.com',
6855+
port: 80,
6856+
path: '/data/123',
6857+
withCredentials: false
6858+
};
6859+
68536860
var req = http.request(options, function (res) {
68546861
var body = '';
6855-
res.setEncoding('utf8');
6862+
//res.setEncoding('utf8');
68566863
res.on('data', function (chunk) {
68576864
body += chunk;
68586865
});

src/Api.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ function Api(config) {
55
hostname: config.hostname,
66
port: config.port || 80,
77
path: '/attask/api',
8-
method: 'GET'
8+
method: 'GET',
9+
withCredentials: false
910
};
1011

1112
// Append version to hostname if provided

src/request.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,16 @@ module.exports = function(Api) {
2929
//}
3030

3131
return new Promise(function (resolve, reject) {
32+
/*options = {
33+
hostname: 'echo.jsontest.com',
34+
port: 80,
35+
path: '/data/123',
36+
withCredentials: false
37+
};*/
38+
3239
var req = http.request(options, function (res) {
3340
var body = '';
34-
res.setEncoding('utf8');
41+
//res.setEncoding('utf8');
3542
res.on('data', function (chunk) {
3643
body += chunk;
3744
});

0 commit comments

Comments
 (0)