3 ms·
All query string parameters are used to identify the resource also. RFC 3986 states "The query component contains non-hierarchical data that, along with data
by Darrel 16y ago
All query string parameters are used to identify the resource also. RFC 3986 states
"The query component contains non-hierarchical data that, along with data in the path component (Section 3.3), serves to identify a resource within the scope of the URI's scheme and naming authority (if any)."
There is absolutely no difference between path segments and query parameters from the perspective of resource identification.
- swombat 16y agoThen the RFC has defined a fairly useless standard. Wouldn't be the first time.
- Robin_Message 16y agoA good rule of thumb here seems to be to put identity in the path and other things in the query string. For example, to search for items with property foo equal to 12 in the music collection known as bar, the url would be /music/bar?foo=12