Sending HTTP Requests as JSON or Form with Node.js and TypeScript

Published: 28 December 2019
on channel: Zaiste Programming
14,349
101

In this episode we will learn how to build a Node.js server written in TypeScript that can not only receive HTTP requests, but also parse the request data automatically, whether the payload is sent as a form or as JSON.

I will also show you how to trigger different types of HTTP requests from the command line using the HTTPie tool. We will see that request data can be passed in the URL as a query string with query params, or by using the dynamic segments. Query params is a part of the URL that starts after the question mark (?) sign. Multiple query params are separated by the ampersand (&) sign. Dynamic URL segments is a convention that allows us to designate any part of the URL, usually at the end as dynamic. This means that the specific dynamic part and put it into a variable. Lastly, we will discuss sending the request data as its body.


#nodejs #typescript #http


Watch video Sending HTTP Requests as JSON or Form with Node.js and TypeScript online without registration, duration hours minute second in high quality. This video was added by user Zaiste Programming 28 December 2019, don't forget to share it with your friends and acquaintances, it has been viewed on our site 14,349 once and liked it 101 people.