0
function getStuff(req: express.Request, res: express.Response, next: express.NextFunction): void {
fetch('http://localhost:3000/stuff')
.then((data: {}) => {
res.send(data.body._readableState.buffer.head.data.toString());
})
.catch((err: {}) => {
res.json(err);
});
}
に私が取得していますエラーが[tslint] Forbidden http url in string 'http://localhost:3000/stuff' (no-http-string)
tslint:禁断のHTTP URL文字列
である私は、このエラーはfetch()
法上// tslint:disable-next-line
を置くことによって無視され得ることもできますが、これに他の解決策はありますか?このルールの