I want to send a link in url, e.g.
However, this solution does not work
@GetMapping("/{url}")
public void writeUrl(@PathVariable String url) {
System.out.println(url);
}
I need to in the @PathVariable or @RequestParam (not in @Body)
I want to send a link in url, e.g.
However, this solution does not work
@GetMapping("/{url}")
public void writeUrl(@PathVariable String url) {
System.out.println(url);
}
I need to in the @PathVariable or @RequestParam (not in @Body)
@GetMapping("/")
public void writeUrl(@RequestParam("url") String url) {
System.out.println(url);
}
then: