Learn how to create a streaming request with clj-http.
- [Teacher] In this video, we'll implement the code…that makes web requests to lakepend array.…I'm in the request.clj file, and first,…I'll define my namespace as lakepend.request.…Now, in our require expression,…I'll pull in clojure.java.io, and I'll alias it to io.…Next, we'll pull in clj-http.client,…and let's alias this as http.…We can use this to make our http request.…
First, I'd like to define a function that helps us…construct the URL, because it's a little bit long.…I'll call this build-url,…and I'll make it take a year parameter…because the URLs differ by the year.…Now, I'll use the str function to build a string,…and I'll begin the string with https, colon slash slash,…lpo.dt.navy.mil/data/…capital D, capital M slash Environmental with a capital E,…underscore Data, all of these capital,…underscore Deep, underscore Moor, M-O-O-R,…and another underscore.…
After this string, we'll put the given year,…and then another string, which is .txt.…And this way, we'll create a URL…that begins with this long https string,…
Skill Level Intermediate
1. Problem 1: Exploring Lake Pend Oreille
2. Problem 2: Image Analysis
3. Problem 3: Eight Queens
4. Problem 4: Accessing Peripherals
5. Problem 5: Recursion and Directories
6. Problem 6: Building the Web
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.