HyperTextTransferProtocol
URL
Method: GET/Post/Put/Delete/
Header: information about the body, size, device type, user-agent, and etc
Body
the Django web application framework includes an Object-Relational Mapping (ORM) layer that abstracts relational database read, write, query, and delete operations.
db->select('*')
db->from('city')
db->where('1')
db->get()
In the middle of 2000, SOAP - an XML-based messaging protocol - started to rise in popularity as a communication protocol for distributed computing.
But Web services, APIs over HTTP, are more popular than ever.
JSON started replacing XML as a serialization technology.
Developers needed a way to provide data to mobile clients.
This was simple enough using many Web frameworks: look something up in a database,
return the rows in a serialized format. Accept POSTs of the same kind of data.
Now, contrast that to using JSON over HTTP, with a slightly more RESTful orientation.
The request for the customer record is an HTTP GET:
GET /customers/43456 HTTP/1.1
Host: www.example.org
And the response:
HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 {‘Customer’: ‘Foobar Quux, inc’}