Specifies the "host" component of the new URI in its "registered name" form (usually DNS), e.g. "server.com". The registered name can contain any string of codepoints. Codepoints that can't be encoded literally will be percent-encoded for you as UTF-8. This field is optional. @param regName
(@Nullable String regName)
| 902 | * @return this, for fluent building |
| 903 | */ |
| 904 | @CanIgnoreReturnValue |
| 905 | public Builder setHost(@Nullable String regName) { |
| 906 | if (regName != null) { |
| 907 | regName = regName.toLowerCase(Locale.ROOT); |
| 908 | regName = percentEncode(regName, regNameChars); |
| 909 | } |
| 910 | this.host = regName; |
| 911 | return this; |
| 912 | } |
| 913 | |
| 914 | /** |
| 915 | * Specifies the "host" component of the new URI as an IP address. |