如何在metamug控制台中将API设为c(1,0)
。我已经有了帐户资源。但是我想用它来访问登录。
由于metamug不允许两个资源在一起,我怎样才能实现这个目标?
它允许/account/login
,但我不想要那个。
答案 0 :(得分:-1)
根据REST架构风格,/account/123/login
是正确的实现。
Metamug遵循风格,不允许路径中的连续资源。
使此URL工作的唯一方法是将login视为标识符。所以这变为Item request。
这是登录请求,我们将使用POST方法。
<Request method="POST" item="true">
<Query when="$id eq login">
select userid from user where username = $user
and password = $pass
<Query>
</Request>
进一步阅读。 https://martinfowler.com/articles/richardsonMaturityModel.html