filmov
tv
Create Three Symfony Back Ends - Part #18 - Handling POST requests in FOSRESTBundle

Показать описание
As our Behat tests rely on being able to "dogfood" our own API in order to run, the most important and immediately urgent task is to get the POST endpoint up and running.
We're going to make use of FOSRESTBundle's Automatic route generation facility to help speed up this process for us. This means we must follow a set convention for controller method naming. If you prefer, manually configured routing is available. We briefly covered this towards the end of the previous video, but as ever, the docs are your friend.
We'll need a few bits in place:
A new Controller class
FOSRESTBundle Routing setup
A postAction
Let's start by adding in the routing setup, as it's really easy.
We're going to make use of FOSRESTBundle's Automatic route generation facility to help speed up this process for us. This means we must follow a set convention for controller method naming. If you prefer, manually configured routing is available. We briefly covered this towards the end of the previous video, but as ever, the docs are your friend.
We'll need a few bits in place:
A new Controller class
FOSRESTBundle Routing setup
A postAction
Let's start by adding in the routing setup, as it's really easy.
Create Three Symfony Back Ends - Part #7 - Symfony Form keeps you tidy
Create Three Symfony Back Ends - Part #28 - Introducing the API Platform
Create Three Symfony Back Ends - Part #1 - Project Introduction
Create Three Symfony Back Ends - Part #29 - The Entry Point in API Platform
Create Three Symfony Back Ends - Part #32 - Starting with POST in API Platform
Create Three Symfony Back Ends - Part #16 - Getting Setup with Symfony 4 and FOSRESTBundle
Create Three Symfony Back Ends - Part #21 - ViewResponseListener in FOSRESTBundle
Create Three Symfony Back Ends - Part #10 - GET one resource
Create Three Symfony Back Ends - Part #38 - PUT to Update in API Platform
Create Three Symfony Back Ends - Part #39 - DELETE to Remove data in API Platform
Create Three Symfony Back Ends - Part #6 - POST in JSON data
Create Three Symfony Back Ends - Part #23 - Collections in FOSRESTBundle
Create Three Symfony Back Ends - Part #22 - GET data from FOSRESTBundle
Create Three Symfony Back Ends - Part #8 - Validate incoming JSON
Create Three Symfony Back Ends - Part #40 - No one likes Errors in API Platform
Create Three Symfony Back Ends - Part #36 - GET One Resource in API Platform
Create Three Symfony Back Ends - Part #25 - PATCH data in FOSRESTBundle
Create Three Symfony Back Ends - Part #11 - GET lots of resources
Create Three Symfony Back Ends - Part #26 - Time to DELETE FOSRESTBundle
Create Three Symfony Back Ends - Part #27 - What about Errors in FOSRESTBundle?
Create Three Symfony Back Ends - Part #31 - Healthcheck Custom Endpoint in API Platform
Create Three Symfony Back Ends - Part #24 - PUT to update in FOSRESTBundle
Create Three Symfony Back Ends - Part #19 - Save POST data to the DB in FOSRESTBundle
Create Three Symfony Back Ends - Part #18 - Handling POST requests in FOSRESTBundle
Комментарии