Proper REST formatted URL with date ranges

后端 未结 3 1095
太阳男子
太阳男子 2020-12-24 00:27

I have a REST URL to get all users formatted like this: http://example.com/users

To get an individual user by id: http://example.com/users/12345

To g

3条回答
  •  执念已碎
    2020-12-24 00:51

    I would go with http://example.com/users/12345/bids?start=2012-01-01&end=2012-01-31.

    • There shouldn't be a slash before the query string.
    • Avoid using slashes in the query string. It'll be easier that way.

提交回复
热议问题