0

我将在我的站点中为预订设施构建一个 API 系统。关键功能是: 1. getData(id) - 从服务器获取产品的一些详细信息(经过少量计算,数据最多为 5 个字段)。2. booking(data array) - 发送10-15个字段数据在服务器中进行注册。

我很困惑要使用哪种 API 技术,SOAP-WSDL 还是 REST??请指教。

主站点每天有大约 10K 访问者,并且根据正在进行的促销活动预计将很快达到 50K-70K。此外,预计通过合作网站集成的拟议 API 可以收到多达 5K 的请求。

你怎么看?

4

1 回答 1

0

I would go with REST. It's as secure as SOAP (i.e. HTTPS), and the payload is smaller as there is no SOAP envelope. Also you can choose to use JSON which would make it smaller still, although you could use JSON with SOAP. The REST verbs lend themselves well to what you are trying to do - GET for getting the data, POST for creating the records etc.

There are plenty of references on the Internet that compare the two protocols.

于 2013-10-22T13:47:11.447 回答