testing request with parameters
Signed-off-by: Peter Siegmund <developer@mars3142.org>
This commit is contained in:
@@ -1,9 +1,16 @@
|
|||||||
package dev.mars3142.fhq.client;
|
package dev.mars3142.fhq.client;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.PathVariable;
|
||||||
import org.springframework.web.service.annotation.GetExchange;
|
import org.springframework.web.service.annotation.GetExchange;
|
||||||
|
|
||||||
public interface TimeZoneClient {
|
public interface TimeZoneClient {
|
||||||
|
|
||||||
@GetExchange("/v1/timezone")
|
@GetExchange("/v1/timezone")
|
||||||
String getTimeZone();
|
String getTimeZone();
|
||||||
|
|
||||||
|
@GetExchange("/v1/timezone/{area}")
|
||||||
|
String getTimeZone(@PathVariable String area);
|
||||||
|
|
||||||
|
@GetExchange("/v1/timezone/{area}/{location}")
|
||||||
|
String getTimeZone(@PathVariable String area, @PathVariable String location);
|
||||||
}
|
}
|
||||||
|
@@ -15,7 +15,7 @@ import lombok.val;
|
|||||||
public class LandingPageView extends Composite<VerticalLayout> {
|
public class LandingPageView extends Composite<VerticalLayout> {
|
||||||
|
|
||||||
public LandingPageView(TimeZoneClient client) {
|
public LandingPageView(TimeZoneClient client) {
|
||||||
val timeZone = client.getTimeZone();
|
val timeZone = client.getTimeZone("Europe", "Berlin");
|
||||||
val verticalLayout = new VerticalLayout();
|
val verticalLayout = new VerticalLayout();
|
||||||
verticalLayout.setSizeFull();
|
verticalLayout.setSizeFull();
|
||||||
verticalLayout.add(new Text(timeZone));
|
verticalLayout.add(new Text(timeZone));
|
||||||
|
Reference in New Issue
Block a user