|
|
@ -121,20 +121,37 @@ img { |
|
|
|
</section> |
|
|
|
</section> |
|
|
|
|
|
|
|
|
|
|
|
<section> |
|
|
|
<section> |
|
|
|
|
|
|
|
<p> |
|
|
|
Em ReST, métodos HTTP viram CRUD: |
|
|
|
Em ReST, métodos HTTP viram CRUD: |
|
|
|
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
|
|
|
<table> |
|
|
|
<ul> |
|
|
|
<thead> |
|
|
|
<li>Create ⇒ POST</li> |
|
|
|
<tr><th>Operação</th><th>Método</th></tr> |
|
|
|
<li>Retrieve ⇒ GET</li> |
|
|
|
</thead> |
|
|
|
<li>Update ⇒ PUT</li> |
|
|
|
|
|
|
|
<li>Delete ⇒ DELETE</li> |
|
|
|
<tbody> |
|
|
|
<li class='fragment'>Update ⇒ PATCH</li> |
|
|
|
<tr><td>Create</td><td>POST</td></tr> |
|
|
|
</ul> |
|
|
|
<tr><td>Retrieve</td><td>GET</td></tr> |
|
|
|
</section> |
|
|
|
<tr><td>Update</td><td>PUT</td></tr> |
|
|
|
</section> |
|
|
|
<tr><td>Delete</td><td>DELETE</td></tr> |
|
|
|
|
|
|
|
</tbody> |
|
|
|
<section> |
|
|
|
</table> |
|
|
|
<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> |
|
|
|
</section> |
|
|
|
</section> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|