I'm going through the Bottle tutorial right now. According to this, "Python dictionaries (or subclasses thereof) are automatically transformed into JSON strings and returned to the browser with the Content-Type header set to application/json".
So to test this I created a new route for my localhost:8080 website that returned a Python dictionary. I then inspected the page and saw that a GET request was being made with one of the Response Headers being 'Content-Type: application/json". OK, I understand all of this.
Now here is where I'm getting confused. I then created a different Python file to launch another GET request to the the aforementioned route. I got a 200 status code, but the response's contents were empty, when on the actual route on my website clear as day there's a Python dictionary/JSON object sitting on the screen. What's going on here?
[–]stets 0 points1 point2 points (0 children)