Passing array in GET for a REST call

前端 未结 6 1508
清歌不尽
清歌不尽 2020-12-13 16:56

I have a url to fetch appointments for a user like this:

/user/:userId/appointments

How should the url look like if I want to get appointme

6条回答
  •  一整个雨季
    2020-12-13 17:35

    /appointments?users=1d1,1d2.. 
    

    is fine. It's pretty much your only sensible option since you can't pass in a body with a GET.

提交回复
热议问题