Is possible to do this custom route in json-server
server.get('/retrievebinary', (req, res) => {
res.set('Content-type', 'application/octet-stream');
res.send(new Buffer('whooop'));
});
I don't get any response I think json-server is not supporting buffers. Here is the documentation about custom routes.
Aucun commentaire:
Enregistrer un commentaire