We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
utils.js中的normalizeData为什么不支持二进制的数据呢?res.json 已经有针对json数据的处理了,这里可以考虑支持二进制的数据否。
end: function end(data) { callback(_status, headers, normalizeData(data)); return this; } function normalizeData(data) { switch (typeof data === 'undefined' ? 'undefined' : _typeof(data)) { case 'string': return data; default: return JSON.stringify(data); } } ` '/custom-func/:action': function(req, res) { res.type(path); fs.readFile(path, function (err, data) { if (err) { res.status(404); res.end("404"); return; } res.type(srcDir + pathName) if (S(mime.lookup(path)).startsWith('image/')) { res.end(data); } else { res.end(data.toString()); } }); }
The text was updated successfully, but these errors were encountered:
@pigcan 有空看下。
Sorry, something went wrong.
No branches or pull requests
utils.js中的normalizeData为什么不支持二进制的数据呢?res.json 已经有针对json数据的处理了,这里可以考虑支持二进制的数据否。
The text was updated successfully, but these errors were encountered: