Quiz

  1. can you go over how you construct the url portion for http

    The URL is just a string. In CoffeeRun and many other REST APIs, there's a "base" part and a "parameter". So you can construct them with string concatenation:

    
    const HEROKU_URL = 'https://coffeerun-v2-rest-api.herokuapp.com/api/coffeeorders';
    $.get(HEROKU_URL + '/' + key, function (serverResponse) {
    
    
  2. Can you give more example?

    Sure. How about the Fake Store API Try the following:

    
    const STORE_URL = 'https://fakestoreapi.com/products'; // another for carts
    $.get(STORE_URL, console.log);
    $.get(STORE_URL + '/7', console.log);
    $.get(STORE_URL + '/categories', console.log);
    
    
  3. How does password encryption work?

    It's a one-way hash function. I cover this in CS 304; you can check it out here: bcrypt