Open gistmap opened 4 years ago
hello, I can't understand what these line of code do.
URI location = ServletUriComponentsBuilder .fromCurrentContextPath().path("/users/{username}") .buildAndExpand(result.getUsername()).toUri(); return ResponseEntity.created(location).body(new ApiResponse(true, "User registered successfully"));
Hello, it means it will return 201 HTTP response and sets the Location in this case location in the response headers
location
hello, I can't understand what these line of code do.