HTTP - AJAX

Request + Response Model

  • Multiple protocols or strategies for getting a resource.
  • Use example of asking someone for their name (request) and have them (respond).
  • Demonstrate different “protocols” using the file example. Ask Braxton what his name is by with file (request), have him with his name on a piece of paper (respond).

Examples

Methods

GET POST PUT DELETE

Callbacks

beforeSend error dataFilter success complete

Promises

done then always fail

Server Up And Running

  1. Install Node.js from nodejs.org
  2. cd
  3. npm start