Skip to content

Instantly share code, notes, and snippets.

@bertoort
Last active May 4, 2016 15:29
Show Gist options
  • Save bertoort/1ced43db56bfbac159afbb0615c85506 to your computer and use it in GitHub Desktop.
Save bertoort/1ced43db56bfbac159afbb0615c85506 to your computer and use it in GitHub Desktop.
Class notes

Class Notes:

URL

URL vs URI

  • URL is a type of URI

https://search.duckduckgo.com:80/settings/user/?q=apples&ia=news#asdf

https://

  • protocol
  • other protocols: ws://, file://, tcp://, http://, https://,

search.duckduckgo.com/

  • server address (Domain)
  • search is the subdomain
  • duckduckgo is the TLD

/settings/user/

  • path

?q=apples&ia=news

  • query
  • follows ?...
  • key-value format
  • seperated by &
  • more info to the server

#asdf

  • anchor
  • where on the page to focus

:8080

  • port number
  • like the path, more specific part of server
  • default === :80

HTTP

HTTP Status Codes

  • 200 ok!
  • 400 client error
  • 500 server error
  • 100 info
  • 300 redirects

HTTP verbs

  • POST and GET
  • other: PUT, DELETE, OPTIONS, etc.

GET - get information

  • by default, url input makes a get request
  • nothing in the body
  • sends info through URL -through query, anchor...

POST - usually to create info (talk more later)

  • information in the body

Important headers -

  • Content-Type
  • location (domain)
  • Status Code (Response)
  • HTTP Verb (Request)
  • Protocol
  • Cookies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment