Quantcast
Channel: Active questions tagged rest - Stack Overflow
Viewing all articles
Browse latest Browse all 4797

How to name REST resource for similar endpoints (findById / findByEmail)?

$
0
0

I have 2 endpoints as shown below, but I cannot use the endpoint urls like this:

@GetMapping("/{email}")public ResponseEntity<Void> findByEmail(@PathVariable String email) {}
@GetMapping("/{id}")public ResponseEntity<Void> findById(@PathVariable long id) {}

Should I use something like @GetMapping("mail/{email}") ?


Viewing all articles
Browse latest Browse all 4797

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>