Answers for "get raw body express"

1

express send raw html

res.set('Content-Type', 'text/html');
res.send(new Buffer('<h2>Test String</h2>'));
Posted by: Guest on October-14-2020
0

express get raw query

const url = require('url');
const express = require('express');

const app = express();
app.use((req, res, next) => {
  const query = url.parse(req.url).query;
  // Do something...
});

const port = 3000;
app.listen(port, console.log(`Listening on port ${port}.`));
Posted by: Guest on August-27-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language