Diferencia entre revisiones de «Usuario:Lmorillas/desarrollo web servidor/django/rest»

De WikiEducator
Saltar a: navegación, buscar
Línea 3: Línea 3:
 
== Qué es REST ==
 
== Qué es REST ==
 
* http://en.wikipedia.org/wiki/Representational_State_Transfer
 
* http://en.wikipedia.org/wiki/Representational_State_Transfer
 +
 +
REST (Representational State Transfer) son un conjunto de reglas que clientes y servidores tienen que seguir para comunicarse. Si un modo de comuncación sigue esas reglas se llama RESTful. El protocolo RESTful más famoso es HTTP. En un servicio RESTful una URL idenfica un trozo de información que con el que el usuario actúa. Cada trozo de información es un recurso. A los recursos se accede usando los verbos HTTP:
 +
; POST
 +
: Crea un recurso.
 +
; GET
 +
: Lee un recurso
 +
; PUT
 +
: Actualiza un recurso existente
 +
; DELETE
 +
: Elimina un recurso
  
 
== Características ==
 
== Características ==

Revisión de 08:34 19 dic 2013


Qué es REST

REST (Representational State Transfer) son un conjunto de reglas que clientes y servidores tienen que seguir para comunicarse. Si un modo de comuncación sigue esas reglas se llama RESTful. El protocolo RESTful más famoso es HTTP. En un servicio RESTful una URL idenfica un trozo de información que con el que el usuario actúa. Cada trozo de información es un recurso. A los recursos se accede usando los verbos HTTP:

POST
Crea un recurso.
GET
Lee un recurso
PUT
Actualiza un recurso existente
DELETE
Elimina un recurso

Características

Client-Server
There should be a separation between the server that offers a service, and the client that consumes it.
Stateless
Each request from a client must contain all the information required by the server to carry out the request. In other words, the server cannot store information provided by the client in one request and use it in another request.
Cacheable
The server must indicate to the client if requests can be cached or not.
Layered System
Communication between a client and a server should be standardized in such a way that allows intermediaries to respond to requests instead of the end server, without the client having to do anything different.
Uniform Interface
The method of communication between a client and a server must be uniform.
Code on demand
Servers can provide executable code or scripts for clients to execute in their context. This constraint is the only one that is optional.