|
|
|
@ -121,20 +121,37 @@ img {
|
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<p> |
|
|
|
|
Em ReST, métodos HTTP viram CRUD: |
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
|
<table> |
|
|
|
|
<thead> |
|
|
|
|
<tr><th>Operação</th><th>Método</th></tr> |
|
|
|
|
</thead> |
|
|
|
|
|
|
|
|
|
<tbody> |
|
|
|
|
<tr><td>Create</td><td>POST</td></tr> |
|
|
|
|
<tr><td>Retrieve</td><td>GET</td></tr> |
|
|
|
|
<tr><td>Update</td><td>PUT</td></tr> |
|
|
|
|
<tr><td>Delete</td><td>DELETE</td></tr> |
|
|
|
|
</tbody> |
|
|
|
|
</table> |
|
|
|
|
<ul> |
|
|
|
|
<li>Create ⇒ POST</li> |
|
|
|
|
<li>Retrieve ⇒ GET</li> |
|
|
|
|
<li>Update ⇒ PUT</li> |
|
|
|
|
<li>Delete ⇒ DELETE</li> |
|
|
|
|
<li class='fragment'>Update ⇒ PATCH</li> |
|
|
|
|
</ul> |
|
|
|
|
</section> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<section> |
|
|
|
|
<h2>Recursos</h2> |
|
|
|
|
<img src='../_images/jellybeans.jpg'></img> |
|
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
|
<ul> |
|
|
|
|
<li>Em ReST, as "tabelas" são chamadas "recursos".</li> |
|
|
|
|
<li>Sempre substantivos no plural.</li> |
|
|
|
|
<li>Duas URLs por recurso |
|
|
|
|
<ul> |
|
|
|
|
<li>Uma para o conjunto;</li> |
|
|
|
|
<li>Uma para elementos específicos.</li> |
|
|
|
|
</ul> |
|
|
|
|
</li> |
|
|
|
|
</ul> |
|
|
|
|
</section> |
|
|
|
|
</section> |
|
|
|
|
</div> |
|
|
|
|