Sinatra supports a variety of HTTP methods. GET and POST are the most common methods. Routes are composed of both the HTTP method and a matching string, and a route is only matched when both parts match.
- [Instructor] In this movie…we're going to learn how to define routes…which can handle different types of HTTP methods.…As we saw in the last movie,…a route is made up of three parts.…We had get and then we had a string…that matched a pattern in the URL…and then we had a block of Ruby code.…The first part of that, the get…is actually an HTTP method.…That is it's a type of web request,…an HTTP request is a web request…and there are several different types…of requests that can be made.…
There's get request, there post,…put, patch, delete and several others.…The most common of these are get and post…and those are the ones we're going to be using…throughout this tutorial.…If you know how to use put, patch, delete…head or anything else,…you can go ahead and use those as well.…Sinatra has support for them.…But most of the time…we're going to be working with get and post.…Get is used for URLs, that is when you type a URL…into the browser bar and for links,…whenever you click on a link,…it issues a get request.…
We're telling a website that we want to get back data,…
- Installing Sinatra
- Launching the server
- Defining routes
- Using route patterns and parameters
- Redirecting requests
- Rendering dynamic templates
- Using partial templates and layouts
- Defining custom helpers
Skill Level Intermediate
Ruby on Rails 5 Essential Trainingwith Kevin Skoglund10h 21m Beginner
3. Helpers and Filters
4. Useful Techniques
- 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.