aboutsummaryrefslogtreecommitdiffstats
path: root/container-core/src/main/java/com/yahoo/restapi/RestApi.java
diff options
context:
space:
mode:
authorJon Marius Venstad <jonmv@gmail.com>2022-04-07 16:29:59 +0200
committerJon Marius Venstad <jonmv@gmail.com>2022-04-07 16:29:59 +0200
commit75114c6c4b96f507071a2caf145b24a22ef0c5ff (patch)
treee4cca74c128bfdad380bc74a9f501d981b9c78ef /container-core/src/main/java/com/yahoo/restapi/RestApi.java
parent190dde5de267462b02c43a18ad605da469715949 (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.java11
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 {}