Lesson 4: Response encoding

Contents
  • Response
  • Status line
  • Header fields
  • Message body
  • Exercise 1: Using the types
  • Exercise 2: Response-constructing functions
Video
  • In progress

In lesson 3, we defined types that to represent HTTP requests and responses. The purpose of that was to be able to rewrite the simple server from lesson 2 so that we no longer have to write HTTP responses by hand. In this lesson, we write the function to convert a Response into a ByteString.


This lesson is under development.