/** * Sets the URI for this call. * * <p> * Can be any of the following types: * <ul> * <li>{@link URI} * <li>{@link URL} * <li>{@link URIBuilder} * <li>Anything else converted to a string using {@link Object#toString()}. * </ul> * * <p> * Relative URL strings will be interpreted as relative to the root URL defined on the client. * * @param uri * The URI to use for this call. * This overrides the URI passed in from the client. * @return This object (for method chaining). * @throws RestCallException */ public RestCall uri(Object uri) throws RestCallException { try { if (uri != null) uriBuilder = new URIBuilder(client.toURI(uri)); return this; } catch (URISyntaxException e) { throw new RestCallException(e); } }
/** * Sets the URI for this call. * * <p> * Can be any of the following types: * <ul> * <li>{@link URI} * <li>{@link URL} * <li>{@link URIBuilder} * <li>Anything else converted to a string using {@link Object#toString()}. * </ul> * * <p> * Relative URL strings will be interpreted as relative to the root URL defined on the client. * * @param uri * The URI to use for this call. * This overrides the URI passed in from the client. * @return This object (for method chaining). * @throws RestCallException */ public RestCall uri(Object uri) throws RestCallException { try { if (uri != null) uriBuilder = new URIBuilder(client.toURI(uri)); return this; } catch (URISyntaxException e) { throw new RestCallException(e); } }
/** * Sets the URI for this call. * * <p> * Can be any of the following types: * <ul> * <li>{@link URI} * <li>{@link URL} * <li>{@link URIBuilder} * <li>Anything else converted to a string using {@link Object#toString()}. * </ul> * * <p> * Relative URL strings will be interpreted as relative to the root URL defined on the client. * * @param uri * The URI to use for this call. * This overrides the URI passed in from the client. * @return This object (for method chaining). * @throws RestCallException */ public RestCall uri(Object uri) throws RestCallException { try { if (uri != null) uriBuilder = new URIBuilder(client.toURI(uri)); return this; } catch (URISyntaxException e) { throw new RestCallException(e); } }