Skip to content

Instantly share code, notes, and snippets.

@rogerwschmidt
Last active June 26, 2017 18:54
Show Gist options
  • Select an option

  • Save rogerwschmidt/df73e5d811fc405346f43a50c8b913d9 to your computer and use it in GitHub Desktop.

Select an option

Save rogerwschmidt/df73e5d811fc405346f43a50c8b913d9 to your computer and use it in GitHub Desktop.

HTTP Instructor notes

  • Explain what HTTP is.
  • Explain why HTTP is important.
  • Explain what an HTTP request is.
  • Explain what an HTTP response is.
  • Send HTTP requests and receive HTTP responses for HTML.
  • Explain what JSON is.
  • Explain why JSON is useful.
  • Send HTTP requests and receive HTTP responses for JSON.

What is HTTP?

  • Turn to your neighbor and explain what HTTP is. Be prepared to share your discussion with the class.
  • Draw the request/reponse cycle.

Why is HTTP important?

Turn to your neighbor and explain why HTTP is important. Be prepared to share your discussion with the class.

What is an HTTP request?

  • Turn to your neighbor and explain what an HTTP request is. Be prepared to share your discussion with the class.
  • What are the 5 parts of a HTTP request.

What is an HTTP response?

  • Turn to your neighbor and explain what an HTTP response is. Be prepared to share your discussion with the class.
  • What are the 4 parts of a HTTP request.

Send HTTP requests and receive HTTP responses for HTML.

Run the following command

curl -v -X GET https://fs-student-roster.herokuapp.com/students/

With your neigbor, identify

  • the request headers
  • the response headers
  • the body

What is JSON?

  • Turn to your neighbor and explain what JSON is. Be prepared to share your answer with the class.
  • Run the following command http -v -j GET https://fs-student-roster.herokuapp.com/students/
  • Where is the request?
  • Where is the response?
  • Where is the body?
  • Where is the header in the request that asks for JSON?

Why is JSON useful?

Turn to your neighbor and explain why JSON is useful. Be prepared to share your answer with the class.

Send HTTP requests and receive HTTP responses for JSON.

Run the following command

http -v GET 'http://www.omdbapi.com/?t=Game of Thrones&apikey=19099f8d'

With your neigbor, identify

  • the request headers
  • the response headers
  • the body
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment