Message from JavaScript discussions

May 2017

— Javascript never ceases to impress me


var bodyParser = require('body-parser');
console.log(request.body) //you will get your data in this as object.

— Thats more like it

— It parses the formdata into an object

— Oh ok nice

— Then gives it to the callback in request

— Do you know a library that can preformat form data into json on the clients side? By chance?

— → Jquery

— Nice.

— You can send it by using JSON.stringify

— Https://

— Then simply parse it back into a JS object on the server