Flask-RESTful uses which of the following as the main building block for a RESTful API?
Resources built on top of Flask pluggable views
Statuses built on top of Flask resource views.
Resources built on top of Flask pluggable controllers.
In order to be able to process an HTTP POST request on a resource, we must declare a method with the following name in a subclass of
flask_restful.Resource
.post_restful
post_method
post
In order to be able to process an HTTP
GET
request on a resource, we must declare a method with the following name in a subclass offlask_restful.Resource
.get_restful
get_method
get
A subclass of
flask_restful.Resource
represents:A controller resource.
A RESTful resource.
A single RESTful HTTP verb.
If we use the
@marshal_with
decorator withmessage_fields
as an argument, the decorator will:Apply the field filtering and output formatting specified in
message_fields
to the appropriate instance.Apply the field filtering specified in
message_fields...
You're reading from Building RESTful Python Web Services
The rest of the page is locked
You have been reading a chapter from
Building RESTful Python Web ServicesPublished in: Oct 2016Publisher: PacktISBN-13: 9781786462251
© 2016 Packt Publishing Limited All Rights Reserved