From 75114c6c4b96f507071a2caf145b24a22ef0c5ff Mon Sep 17 00:00:00 2001 From: Jon Marius Venstad Date: Thu, 7 Apr 2022 16:29:59 +0200 Subject: Use HttpURL for base url and query in StateRequestHandler --- container-core/src/main/java/com/yahoo/restapi/RestApi.java | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'container-core/src/main/java/com/yahoo/restapi/RestApi.java') diff --git a/container-core/src/main/java/com/yahoo/restapi/RestApi.java b/container-core/src/main/java/com/yahoo/restapi/RestApi.java index 05528bc79e2..5dfb19029cc 100644 --- a/container-core/src/main/java/com/yahoo/restapi/RestApi.java +++ b/container-core/src/main/java/com/yahoo/restapi/RestApi.java @@ -129,12 +129,9 @@ public interface RestApi { Optional requestContent(); RequestContent requestContentOrThrow(); ObjectMapper jacksonJsonMapper(); - /** - * Creates a URI builder pre-initialized with scheme, host and port. - * Intended for response generation (e.g for interactive REST APIs). - * DO NOT USE FOR CUSTOM ROUTING. - */ - UriBuilder uriBuilder(); + /** Scheme, domain and port, for the original request. Use this only for generating resources links, not for custom routing! */ + // TODO: this needs to include path and query as well, to be useful for generating resource links that need not be rewritten. + HttpURL baseRequestURL(); AclMapping.Action aclAction(); Optional userPrincipal(); Principal userPrincipalOrThrow(); @@ -155,9 +152,11 @@ public interface RestApi { } interface PathParameters extends Parameters { + HttpURL.Path getFullPath(); Optional getRest(); } interface QueryParameters extends Parameters { + HttpURL.Query getFullQuery(); List getStringList(String name); } interface Headers extends Parameters {} -- cgit v1.2.3