Cookies7:27 with Kenneth Love
No, not the kind you dunk in milk. Browser cookies are little bits of data that your browser lets sites store on your computer. We'll use them to store all of the user's choices for their bear. Let's see how to store information in a cookie for later retrieval.
The JSON library docs. 99% of the time, you won't need anything more than
Response: A response is the data that the server, Flask, sends back to the client.
make_response(): This function generates the entire response object that'll be sent back to the client, but lets you store it in a variable for further manipulation.
response.set_cookie(): Sets a cookie on the response object. Takes name for the cookie and a value.
json.dumps(): This method turns a Python data structure (list, string, dictionary, etc) into a JSON string.
json.loads(): This method turns a JSON string into a Python object.
You need to sign up for Treehouse in order to download course files.Sign up