Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Check answers please Given the following HTML form... action-/form text name-user value-bob place holder-Your name /> Complete the following node.js server in questions 16- 19

Check answers please

image text in transcribed

Given the following HTML form...
action-"/form" "text" name-user" value-"bob" place holder-"Your name "/>
Complete the following node.js server in questions 16- 19 below: 01: var http = require( 'http'); 02: var url -require ('url' 03: var fs = require ('fs'); 04: http.createServer ( 05: 06: function requestHandler (req, res) ( 07 var urlObj-url.parse (req.url,/true) 08 if (urlObj.pathname 09: 10: ).listen (2406) if (err) respond (404, "Not found!") else respond (200, "Thanks "+ 12: //... other server routes 13: 14 Eunction respond (code, data) ( 15: 16: 17: 18:) res.writeHead (code, "Content-Type": " res.end (data); Il in the blank on line 4, such that the server is created properly? requestHandler ) reques:Handler()% C) requestHandler(request, response) * D) requestHandler(http.request.http.response) E) None of the above will work correctly 17) Which of the following is the correct answer to fill in the blank on line 8, such that a route is created for handling the submitted form? "form" B) "/form/submit" C) "GET:/form" * D) "GET:/frm/submit', E) "/form/submit?user=bob

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Using Entity Relationship Diagrams

Authors: Sikha Saha Bagui, Richard Walsh Earp

3rd Edition

103201718X, 978-1032017181

Students also viewed these Databases questions