pre-rh

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’}

 
 


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值