In this recipe, we'll look at how to make a URL of the http://yourserver/path1/path2 form accessible to users. This can be either a web page or a path returning arbitrary data to be consumed by other programs. In the latter case, you would usually use the JSON format to consume parameters and to offer your data.
Making a path accessible from the network
Getting ready
We'll make use of the library.book model, which we looked at in Chapter 5, Application Models; so, in case you haven't done so yet, grab its code, so that you will be able to follow the examples.
We want to allow any user to query the full list of books. Furthermore, we want to provide the same information to programs through a JSON request.
...