Skip to main content
Practice JavaScript, Setup Node, NPM and Explore Some Methods of HTTP Module
- Prepare code samples to demonstrate usage of following concepts in JS:
- Fat Arrow functions
- Create modules, export it and use it by importing into another module
- Create classes that extends another class. create its object and use it.
- Spread operator with usage in arrays and objects
- Object Destructuring
- Please make use of validator packages and validate different types of data using: https://www.npmjs.com/package/validator
- Makeuse of different methods in string module https://www.npmjs.com/package/@stdlib/string you an use any module from npm. searcing "string utils"
- Create different http handlers to perform following tasks (you can do each task in different file too):
- extract data received in query string and write that data to http response. For example, if user send request to a url like below:
http://localhost:8000/processdata?name=ali&age=20&city=Lahore
The handler should write these data attributes on response.
- Send custom headers to response e.g. Content-Length, content-type,
- Print all headers recevied in http request.
- Print which HTTP method the request used
- Store a sample file that contains multiple users data in json format. Sender only object whose ID is received in http request as query string with parameter name user_id
- In an HTML table have two column. Render all headers name and theis values received in http request
Comments
Post a Comment