Molten Framework: Advanced Features
This course covers the use of features in the Molten framework to make your HTTP APIs meaningful and easy to use and test. Youll begin by connecting your Molten application to a SQLite database including the creation of a cursor to work with the database. Youll then wire up your app so that all the data sent in using POST requests to a specific route is written out to the database. Youll also define handlers for GET requests for that same data by reading from the database. Next youll then look at adding middleware into your app and set this middleware to check request headers for the authorization to invoke requests. Youll also tweak the middleware to distinguish between certain types of requests so that authorization is only required for some of them. Youll also see how you can dynamically generate documentation for your Molten application using the OpenAPIHandler. Youll explore how you can use the OpenAPIUIHandler to produce a Swagger UI which can be used by developers to test the application and also by users to figure out exactly how to use your APIs. Finally youll learn how you can serve images to clients using Molten including attaching a local file to a Response object and returning it to the client.