O'Reilly logo

Get Programming with Haskell by Will Kurt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required