diff options
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 {} |