/** * Builds a new fake request corresponding to a given route call. * @param call the route call. * @return the request builder. */ public static RequestBuilder fakeRequest(Call call) { return fakeRequest(call.method(), call.url()); }
/** * Build a new fake request corresponding to a given route call */ public static RequestBuilder fakeRequest(Call call) { return fakeRequest(call.method(), call.url()); }
/** * Builds a new fake request corresponding to a given route call. * @param call the route call. * @return the request builder. */ public static RequestBuilder fakeRequest(Call call) { return fakeRequest(call.method(), call.url()); }
/** * Transform this call to an WebSocket URL. * * @param host the host for the absolute URL. * @param secure true if it should be a wss rather than ws URL * @return the url string */ public String webSocketURL(boolean secure, String host) { return "ws" + (secure ? "s" : "") + "://" + host + this.url(); }
/** * Transform this call to an WebSocket URL. * * @param host the host for the absolute URL. * @param secure true if it should be a wss rather than ws URL * @return the url string */ public String webSocketURL(boolean secure, String host) { return "ws" + (secure ? "s" : "") + "://" + host + this.url(); }
/** * Transform this call to an WebSocket URL. * * @param host the host for the absolute URL. * @param secure true if it should be a wss rather than ws URL * @return the url string */ public String webSocketURL(boolean secure, String host) { return "ws" + (secure ? "s" : "") + "://" + host + this.url(); }
/** * Transform this call to an absolute URL. * * @param secure true if the absolute URL should use HTTPS protocol instead of HTTP * @param host the absolute URL's domain * @return the absolute URL string */ public String absoluteURL(boolean secure, String host) { return "http" + (secure ? "s" : "") + "://" + host + this.url() + this.appendFragment(); }
/** * Transform this call to an absolute URL. * * @param secure true if the absolute URL should use HTTPS protocol instead of HTTP * @param host the absolute URL's domain * @return the absolute URL string */ public String absoluteURL(boolean secure, String host) { return "http" + (secure ? "s" : "") + "://" + host + this.url() + this.appendFragment(); }
/** * Transform this call to an absolute URL. */ public String absoluteURL(boolean secure, String host) { return "http" + (secure ? "s" : "") + "://" + host + this.url() + this.appendFragment(); }
/** * Returns a new Call with the given fragment. * * @param fragment the URL fragment * @return a copy of this call that contains the fragment */ public Call withFragment(String fragment) { return new play.api.mvc.Call(method(), url(), fragment); }
/** * Transform this path into its canonical form. * @return the canonical path. */ public String canonical() { return Paths.canonical(this.url()) + this.appendFragment(); }
/** * Transform this call to a relative path. * @param startPath the URL to make this Call relative to. * @return the relative path string */ public String relativeTo(String startPath) { return Paths.relative(startPath, this.url()) + this.appendFragment(); }
/** * Returns a new Call with the given fragment. * * @param fragment the URL fragment * @return a copy of this call that contains the fragment */ public Call withFragment(String fragment) { return new play.api.mvc.Call(method(), url(), fragment); }
/** * Returns a new Call with the given fragment. */ public Call withFragment(String fragment) { return new play.api.mvc.Call(method(), url(), fragment); }
/** * Transform this path into its canonical form. * @return the canonical path. */ public String canonical() { return Paths.canonical(this.url()) + this.appendFragment(); }
/** * Returns a new Call with the given fragment. * * @param fragment the URL fragment * @return a copy of this call that contains the fragment */ public Call withFragment(String fragment) { return new play.api.mvc.Call(method(), url(), fragment); }
/** * Transform this call to a relative path. * @param startPath the URL to make this Call relative to. * @return the relative path string */ public String relativeTo(String startPath) { return Paths.relative(startPath, this.url()) + this.appendFragment(); }
/** * Append a unique identifier to the URL. * * @return a copy if this call with a unique identifier to this url */ public Call unique() { return new play.api.mvc.Call(method(), this.uniquify(this.url()), fragment()); }
/** * Append a unique identifier to the URL. * * @return a copy if this call with a unique identifier to this url */ public Call unique() { return new play.api.mvc.Call(method(), this.uniquify(this.url()), fragment()); }
/** * Append a unique identifier to the URL. * * @return a copy if this call with a unique identifier to this url */ public Call unique() { return new play.api.mvc.Call(method(), this.uniquify(this.url()), fragment()); }