File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
src/main/java/spp/demo/command Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -28,14 +28,15 @@ public class ViewTraces {
2828 */
2929 @ Get ("/view-traces" )
3030 public HttpResponse <Void > entryEndpoint () throws Exception {
31- // try (HttpClient client = HttpClient.create(new URL("http://localhost:8080"))) {
32- // client.toBlocking().retrieve("/command/view-traces/exit");
33- // }
34- return HttpResponse .ok ();
31+ try (HttpClient client = HttpClient .create (new URL ("http://localhost:8080" ))) {
32+ return client .toBlocking ().exchange ("/command/view-traces/exit" );
33+ } catch (Exception e ) {
34+ return HttpResponse .serverError ();
35+ }
3536 }
3637
3738 @ Get ("/view-traces/exit" )
38- public HttpResponse <String > exitEndpoint () {
39- return HttpResponse .ok ("Success" );
39+ public HttpResponse <Void > exitEndpoint () {
40+ return HttpResponse .ok ();
4041 }
4142}
You can’t perform that action at this time.
0 commit comments