You know how to write scripts and games using Ruby but so far that's all confined within the boundaries of your local system. In this section, you'll learn how to break free and start mucking around on the Internet.
You (should have) learned about how the web works in the How Does The Web Work lesson from the Web Development 101 course, but it might be worth heading back for a refresher if you've got any lingering questions. You'll be working with HTTP requests and responses quite a bit in this section so it's important to at least understand what's going on there.
Ruby (or a gem that you've downloaded) will give you the power to send HTTP requests, whether GET or POST or PUT or DELETE, and then wait for a response. You'll find yourself needing to take apart that response to get to the good stuff, whether that's the HTML of a web page you're trying to scrape or a JSON object returned by some website's API that you've queried. Every gem has a slightly different way of doing it, but the principles remain the same. On the flip side, Ruby gives you the tools to listen for requests and deliver responses... as a web server yourself!
We're learning this stuff for two reasons. First, it's important to understand the underlying fundamentals of how web requests and responses work if you want to actually build web pages. Ruby on Rails will take care of lots of this nitty gritty stuff for you if that's your goal, but having worked with your bare hands before will give you a giant leg up when using it and it doesn't take long to figure out. Second, there's a big world outside of Rails, and you should have the tools to build some nifty Ruby programs that can play around on the web. Because it's a whole lot more fun!
This lesson won't be nearly as long as the previous few, and should have you building stuff pretty early on. Actually, the project section is really where you'll be spending all your time. Let the spamming begin.
Look through these now and then use them to test yourself after doing the assignment
$ curl http://www.google.comand observe the massive chunk of text that gets returned. That's Google's homepage and should give you an idea of some of the responses you can get from these types of requests.
This section contains helpful links to other content. It isn't required, so consider it supplemental for if you need to dive deeper into something
From the creators of The Odin Project...