Chapter 2. Exploring the HTTP Object

In this chapter we will cover:

  • Processing POST data
  • Handling file uploads
  • Using Node as an HTTP client
  • Implementing download throttling

Introduction

In the previous chapter, we used the http module to create a web server. Now we're going to look into some associated use cases beyond simply pushing content from server to client. The first three recipes will explore how to receive data via client-initiated HTTP POST (and PUT) requests, and in the final recipe we'll demonstrate how to throttle a stream of outbound data.

Get Node Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.