Intern Track Roadmap

HTTP verb: GET

This course covers the HTTP GET method, the most common way a client asks a server for data. It explains why GET is safe and idempotent and how a request is built from a URL and headers with no body. It also shows what a response contains: status code, headers and body. It then looks at query strings, URL encoding and caching with Cache-Control, and at tools such as the browser, curl and API clients. The last part shows how Rails routes GET requests, reads params and builds links.

What you'll learn

  • ✓Why GET is read-only, safe and idempotent
  • ✓How a GET request uses the URL and headers instead of a body
  • ✓Status codes, response headers and the response body
  • ✓Query strings, key-value pairs and URL encoding
  • ✓Caching GET responses with the Cache-Control header
  • ✓Handling GET requests in Rails with routes, params and link_to
Free preview · Lesson 1 2 min read

What is the GET method?

Imagine you walk into a restaurant and ask the host to see the menu. You aren't ordering anything or changing anything: you are just requesting information. In the web development world, when a browser asks a server for information, it uses the GET method.

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...