{"blog_url":"https://daralib.hatenablog.com/","width":"100%","provider_name":"Hatena Blog","title":"Node.js fetch \u30af\u30ed\u30b9\u30aa\u30ea\u30b8\u30f3","image_url":null,"url":"https://daralib.hatenablog.com/entry/2019/11/20/175613","version":"1.0","author_url":"https://blog.hatena.ne.jp/daralib/","blog_title":"\u3060\u3089\uff04\u3061\u3063\u3077\u3059","type":"rich","provider_url":"https://hatena.blog","author_name":"daralib","categories":[],"description":"\u3010\u30b5\u30fc\u30d0\u5074\u3011 const cors = require('cors'); //\u30af\u30ed\u30b9\u30aa\u30ea\u30b8\u30f3 \uff11\uff0e\u5168\u90e8\u3084\u3063\u3061\u3083\u3063\u3066\u3044\u3044\u3068\u304d app.use(cors()); \uff12\uff0e\u500b\u5225\u306b\u6307\u5b9a\u3059\u308b\u3068\u304d app.get('/getdata', cors(), (req, res) => { }); \u3010\u30d6\u30e9\u30a6\u30b6\u5074\u3011 fetch('http://123.456.789:3000/getdata, {mode: 'cors'}) .then { });","height":"190","published":"2019-11-20 17:56:13","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fdaralib.hatenablog.com%2Fentry%2F2019%2F11%2F20%2F175613\" title=\"Node.js fetch \u30af\u30ed\u30b9\u30aa\u30ea\u30b8\u30f3 - \u3060\u3089\uff04\u3061\u3063\u3077\u3059\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>"}