Lesson 39. Making HTTP requests in Haskell

After reading lesson 39, you’ll be able to

  • Fetch web pages by using Haskell
  • Generate more complex requests by setting headers and using HTTPS
  • Understand how to approach learning new Haskell types and libraries

In this lesson, you’ll learn how to make an HTTP request in Haskell and save the results to a file. The data you’ll fetch is from the National Oceanic and Atmospheric Administration (NOAA) Climate Data API. This API requires you to send a custom HTTP request that uses SSL and has a custom header for authentication. You’ll use the Network.HTTP.Simple library, which will allow you to make simple requests as well as create custom HTTP requests. You’ll start by learning how to use Network.HTTP.Simple ...

Get Get Programming with Haskell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.