newBuilder
newBuilder: (HttpUrl) -> HttpUrlBuilderA builder holding this URL.
HttpUrl.get(…)
HttpUrl.parse(…)
HttpUrlBuilder.new():build()| Method | Returns | Description |
|---|---|---|
newBuilder() | HttpUrlBuilder | A builder holding this URL. |
scheme() | string | http or https. |
isHttps() | boolean | Whether it is https. |
host() | string | The host: lowercase, IDN in ASCII, an IP literal canonical. |
port() | number | The port (the scheme's default when the URL names none). |
username() | string | The decoded user name. |
password() | string | The decoded password. |
encodedPath() | string | The path, encoded (/a%20b/c). |
pathSegments() | {string} | The path segments, decoded. |
encodedPathSegments() | {string} | The path segments, encoded. |
encodedQuery() | string? | The query, encoded, or nil without one. |
query() | string? | The query, decoded, or nil. |
queryParameter(string) | string? | The first value of query parameter name, decoded, or nil. |
queryParameterValues(string) | { n: number, [number]: string? } | Every value of name, decoded (nil for one without =). |
querySize() | number | How many query parameters. |
fragment() | string? | The fragment, decoded, or nil. |
equals(any) | boolean | Whether other is the same URL. |
toString() | string | The URL, as OkHttp writes it. |
get(string) | HttpUrl | The URL url names; anything but an http/https URL is IllegalArgumentException. |
parse(string) | HttpUrl? | The URL url names, or nil. |
| Field | Type | Description |
|---|---|---|
Builder | HttpUrlBuilderClass | HttpUrl.Builder: the nested class HttpUrlBuilder. |
| Method | Returns | Description |
|---|---|---|
HttpUrlBuilder.build | HttpUrl | The URL; without a scheme or host it is IllegalStateException. |
HttpUrlClass.get | HttpUrl | The URL url names; anything but an http/https URL is IllegalArgumentException. |
HttpUrlClass.parse | HttpUrl? | The URL url names, or nil. |
Request.url | HttpUrl | The URL. |
newBuildernewBuilder: (HttpUrl) -> HttpUrlBuilderA builder holding this URL.
schemescheme: (HttpUrl) -> stringhttp or https.
isHttpsisHttps: (HttpUrl) -> booleanWhether it is https.
hosthost: (HttpUrl) -> stringThe host: lowercase, IDN in ASCII, an IP literal canonical.
portport: (HttpUrl) -> numberThe port (the scheme's default when the URL names none).
usernameusername: (HttpUrl) -> stringThe decoded user name.
passwordpassword: (HttpUrl) -> stringThe decoded password.
encodedPathencodedPath: (HttpUrl) -> stringThe path, encoded (/a%20b/c).
pathSegmentspathSegments: (HttpUrl) -> {string}The path segments, decoded.
encodedPathSegmentsencodedPathSegments: (HttpUrl) -> {string}The path segments, encoded.
encodedQueryencodedQuery: (HttpUrl) -> string?The query, encoded, or nil without one.
queryquery: (HttpUrl) -> string?The query, decoded, or nil.
queryParameterqueryParameter: (HttpUrl, string) -> string?The first value of query parameter name, decoded, or nil.
queryParameterValuesqueryParameterValues: (HttpUrl, string) -> { n: number, [number]: string? }Every value of name, decoded (nil for one without =).
querySizequerySize: (HttpUrl) -> numberHow many query parameters.
fragmentfragment: (HttpUrl) -> string?The fragment, decoded, or nil.
equalsequals: (HttpUrl, any) -> booleanWhether other is the same URL.
toStringtoString: (HttpUrl) -> stringThe URL, as OkHttp writes it.
getget: (string) -> HttpUrlThe URL url names; anything but an http/https URL is IllegalArgumentException.
parseparse: (string) -> HttpUrl?The URL url names, or nil.