File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 } ) ;
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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 } ) ;
You can’t perform that action at this time.
0 commit comments