Reputation: 11
I have been trying to figure out how I could extract the segment path parameters from a REST url.
We know that REST url parameters can be represented in two ways:
When a user clicks on a link from our website we capture the link and the subsequent path traversed using Google Api and save it in our database as three parts:
For example: http://www.test.com/article/12345?order=2
is seperated into:
baseurl : http://www.test.com/article
segment path parameters : 12345
query parameters : order=2
I am aware of how I can separate the segments out of a url, but my question is how do I know if in a given url a segment is a parameter or not. For example in the above example "12345" could be a REST parameter or simply part of the path. How does one distinguish that
Upvotes: 1
Views: 1660