How to structure a URI request for multiple values ​​for the same key?

I am trying to structure a URI that accesses my data by id.

Currently, my URIs are based on a query like this:

.../content?parentList=15&type=note

How could I structure a similar URI so that I could request notes in multiple lists?

Essentially combining the results of the following two URIs.

.../content?parentList=15&type=note
.../content?parentList=16&type=note

Is there a standard way to do this?

+3
source share
2 answers

According to the current draft URI template specification (section 3.6 on page 7) you can do:

.../content?parentList=15,16&type=note
+3
source

URI , . :

.../content?parentList=15&parentList=16&type=note

URI :

{?list+}

?list=val1&list=val2&list=val3 
+1

Source: https://habr.com/ru/post/1755886/


All Articles