清戈 發表於 2020-4-12 09:23:00

web api和rest api的区别

<p>web api和rest api的区别</p>
<div>&nbsp;DELPHI似乎很少讲WEB&nbsp;API,讲得多的是REST&nbsp;API,其实REST&nbsp;API是WEB&nbsp;API的一个子集。DELPHI完全可以开发WEB&nbsp;API。</div>
<div>
<div>&nbsp;相比DELPHI,PHP,.NET&nbsp;喜爱用WEB&nbsp;API名词。</div>
<div>
<p><strong>什么是web api?</strong><br>通讯:HTTP<br>请求方式:get,post,put,patch....<br>请求参数:json或xml格式的key-value类型数据<br>响应结果:返回json或xml格式的key-value类型数据<br>请求参数的格式决定了响应数据的格式</p>
<p><strong>什么是rest api?</strong></p>
<p>通讯:HTTP<br>请求方式:get,post,put,patch....<br>请求参数:json或key-value类型数据<br>响应结果:返回json</p>
<p><strong>两者区别</strong></p>
<p>rest api一般喜欢json返回结果。</p>
</div>
</div>

</div>
<div id="MySignature" role="contentinfo">
    <p>本文来自博客园,作者:{咏南中间件},转载请注明原文链接:https://www.cnblogs.com/hnxxcxg/p/12683725.html</p><br><br>
来源:https://www.cnblogs.com/hnxxcxg/p/12683725.html
頁: [1]
查看完整版本: web api和rest api的区别