Create a new {@code WebTarget} instance by resolving a URI template with a given {@code name}in the URI of the current target instance using a supplied encoded value. A template with a matching name will be replaced by the supplied value. Value is converted to {@code String} using its {@code toString()} method and is thenencoded to match the rules of the URI component to which they pertain. All % characters in the stringified values that are not followed by two hexadecimal numbers will be encoded. In case a {@code null} template name or value is entered a {@link NullPointerException}is thrown.
A snapshot of the present configuration of the current (parent) target instance is taken and is inherited by the newly constructed (child) target instance.
@param name name of the URI template.
@param value encoded value to be used to resolve the template.
@return a new target instance.
@throws NullPointerException if the resolved template name or value is {@code null}.