Make PDF compile

master
Petr Stefan 8 years ago
parent 363077f1b4
commit b4b81f5291

@ -1465,16 +1465,16 @@ a Nette extension which makes integration of Doctrine 2 very straightforward.
A typical scenario for handling an API request is matching the HTTP request with A typical scenario for handling an API request is matching the HTTP request with
a corresponding handler routine which creates a response object, that is then a corresponding handler routine which creates a response object, that is then
sent back to the client, encoded with JSON. The Nette\Application package can be sent back to the client, encoded with JSON. The `Nette\Application` package can
used to achieve this with Nette, although it is meant to be used mainly in MVP be used to achieve this with Nette, although it is meant to be used mainly in
applications. MVP applications.
Matching HTTP requests with handlers can be done using standard Nette URL Matching HTTP requests with handlers can be done using standard Nette URL
routing -- we will create a Nette route for each API endpoint. Using the routing routing -- we will create a Nette route for each API endpoint. Using the routing
mechanism from Nette logically leads to implementing handler routines as Nette mechanism from Nette logically leads to implementing handler routines as Nette
Presenter actions. Each presenter should serve logically related endpoints. Presenter actions. Each presenter should serve logically related endpoints.
The last step is encoding the response as JSON. In Nette\Application, HTTP The last step is encoding the response as JSON. In `Nette\Application`, HTTP
responses are returned using the `Presenter::sendResponse()` method. We decided responses are returned using the `Presenter::sendResponse()` method. We decided
to write a method that calls `sendResponse` internally and takes care of the to write a method that calls `sendResponse` internally and takes care of the
encoding. This method has to be called in every presenter action. An alternative encoding. This method has to be called in every presenter action. An alternative

Loading…
Cancel
Save