diff options
author | Jon Marius Venstad <jonmv@gmail.com> | 2022-04-07 16:29:59 +0200 |
---|---|---|
committer | Jon Marius Venstad <jonmv@gmail.com> | 2022-04-07 16:29:59 +0200 |
commit | 75114c6c4b96f507071a2caf145b24a22ef0c5ff (patch) | |
tree | e4cca74c128bfdad380bc74a9f501d981b9c78ef /container-core/src/main/java/com/yahoo/restapi/RestApi.java | |
parent | 190dde5de267462b02c43a18ad605da469715949 (diff) |
Use HttpURL for base url and query in StateRequestHandler
Diffstat (limited to 'container-core/src/main/java/com/yahoo/restapi/RestApi.java')
-rw-r--r-- | container-core/src/main/java/com/yahoo/restapi/RestApi.java | 11 |
1 files changed, 5 insertions, 6 deletions
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(); 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. <em>Use this only for generating resources links, not for custom routing!</em> */ + // 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<Principal> userPrincipal(); Principal userPrincipalOrThrow(); @@ -155,9 +152,11 @@ public interface RestApi { } interface PathParameters extends Parameters { + HttpURL.Path getFullPath(); Optional<HttpURL.Path> getRest(); } interface QueryParameters extends Parameters { + HttpURL.Query getFullQuery(); List<String> getStringList(String name); } interface Headers extends Parameters {} |