我应该使用休息还是肥皂 [英] Should i use rest or soap

查看:52
本文介绍了我应该使用休息还是肥皂的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先:我来自德国,很抱歉我的英语.

First of all: I´m from germany, so sorry for my english.

我阅读了很多有关 REST 和 SOAP 的资料,并找出了许多优点和缺点,但我仍然不确定该为我的应用程序使用哪一种.我的应用程序应该提供用于创建、删除、更新和接收数据的 API.所以我想以 REST 的方式实现它.还应该可以将大数据(例如视频)发布到我的 API,并且此 API 应该只能由经过身份验证的人使用.

I read a lot about REST and SOAP and figured out many pros and cons, but I´m still not sure which one to use for my application. My application should provide an API for creating, deleting, updating and receiving data. So I thought of implementing it the REST way. It should also be possible to post big data (such as videos) to my API and this API should only be usable by authenticated persons.

最后两个限制是否迫使我选择 SOAP over REST 或者是否(轻松)可以通过 REST API 对用户进行身份验证?

Does the last two constraints force me to choose SOAP over REST or is it (easily) possible to authenticate users via a REST API?

提前致谢

推荐答案

SOAP 的开销比 REST 多.所以我更愿意在你的情况下使用 REST.

SOAP has more overhead then REST. So I would prefer to use REST in your case.

有多种方法可以为任何 Web 服务添加身份验证.

There are different ways to add authentication to any web service.

您可以在方法中使用票"或使用 cookie 或 http 协议的其他自定义标头

You could use a "ticket" within the methods or use cookies or other custom header of the http protocol

这篇关于我应该使用休息还是肥皂的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆