简体   繁体   English

域驱动开发中的正确URL

[英]Correct URL in Domain Driven Development

Suppose a completely theoretical path. 假设一条完全理论上的路径。 I've alway wondered what would be the correct URL, from a REST-ful point of view? 从REST风格的角度来看,我一直想知道正确的URL是什么?

 /users/{userId}/details

OR 要么

/users/details/{userId}

I highly incline on the first one, but just to make sure... 我强烈倾向于第一个,但要确保...

/users/{userId}/details makes more sense. /users/{userId}/details更有意义。

You can refer as some famous API ( Spotify for example ) 您可以引用一些著名的API( 例如Spotify

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM