<div dir="ltr">I was curious what the best practices would be for url routing with many endpoints. <div><br></div><div>For example</div><div><br></div><div>POST /user/</div><div>GET /user/{userId}</div><div>GET /document/{documentId} ContentType=appliction/json (only respond when json is requested)</div>
<div><br></div><div>What would be the best option for this? I was able to achieve most of what i wanted using the PredicatesHandler class. Is this a good choice?</div><div><br></div><div>This would build a List of PredicatedHandlers as well as the fall through handler which I would use as a 404. I got an example working using the text predicate format</div>
<div><br></div><div>
<p class="">method[GET] and path-template[value=\"/user/{userId}\"]</p><p class=""><br></p><p class="">Is this a good approach or are there better recommendations?<br></p><p class=""><br></p><p class="">Thanks,</p>
<p class="">Bill</p></div>
</div>