Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

Processing User Input

node v10.24.1
version: 1.0.0
endpointsharetweet
const url = require("url"); exports.endpoint = function(request, response) { let body = ""; let {query} = url.parse(request.url, true); if (query && query.data) { // process user input body += `<h1>Data: ${query.data}</h1>`; } body += "<form><input name='data' required /><button>Submit</button></form>"; response.setHeader("Content-Type","text/html"); response.end(body); } // Render endpoint "<iframe src='https://untitled-8aru6fqdkacs.runkit.sh/' style='width:100%;border:none'></iframe>"
Loading…

1 comment

  • posted 3 years ago by jigrose88
    Cash app

sign in to comment