• Can you explain again what 'body' means with the POST and PUT methods?

    I decided to write an body

    When POSTing an Ajax request, the body might be quite short: just a bit of JSON, say

    The point, though, is that for POST, the BODY contains the data, if any.

    We can also look in the developer tools. I'll demo that when we get to the demo.

  • And what's the difference between POST and PUT?

    POST creates a new entity. Like SQL INSERT

    PUT updates and existing entity. List SQL UPDATE

  • How does JSON handle nested or complex data, like objects within lists within objects?

    Quite well. Just nest the structures:

    {place: {name: "Wellesley", address: {streetAddr: {name: "College St", number: 106}}}}
  • How do you handle user authentication/authorization with REST APIs?

    Great question! You can certainly POST username/password values using Ajax. Or, you can use sessions.

    Ajax requests include cookies, which includes the session cookie, so you can do everything with Ajax that we do with non-Ajax.

  • None. I think the demo will solidify everything. / I think I understand just need some practise.

    Let's do it!