okhttp / okhttp3 / HttpUrl / Builder

Builder

class Builder

Constructors

<init>

Builder()

Functions

addEncodedPathSegment

fun addEncodedPathSegment(encodedPathSegment: String): HttpUrl.Builder

addEncodedPathSegments

fun addEncodedPathSegments(encodedPathSegments: String): HttpUrl.Builder

Adds a set of encoded path segments separated by a slash (either \ or /). If encodedPathSegments starts with a slash, the resulting URL will have empty path segment.

addEncodedQueryParameter

fun addEncodedQueryParameter(encodedName: String, encodedValue: String?): HttpUrl.Builder

Adds the pre-encoded query parameter to this URL's query string.

addPathSegment

fun addPathSegment(pathSegment: String): HttpUrl.Builder

addPathSegments

fun addPathSegments(pathSegments: String): HttpUrl.Builder

Adds a set of path segments separated by a slash (either \ or /). If pathSegments starts with a slash, the resulting URL will have empty path segment.

addQueryParameter

fun addQueryParameter(name: String, value: String?): HttpUrl.Builder

Encodes the query parameter using UTF-8 and adds it to this URL's query string.

build

fun build(): HttpUrl

encodedFragment

fun encodedFragment(encodedFragment: String?): HttpUrl.Builder

encodedPassword

fun encodedPassword(encodedPassword: String): HttpUrl.Builder

encodedPath

fun encodedPath(encodedPath: String): HttpUrl.Builder

encodedQuery

fun encodedQuery(encodedQuery: String?): HttpUrl.Builder

encodedUsername

fun encodedUsername(encodedUsername: String): HttpUrl.Builder

fragment

fun fragment(fragment: String?): HttpUrl.Builder

host

fun host(host: String): HttpUrl.Builder

password

fun password(password: String): HttpUrl.Builder

port

fun port(port: Int): HttpUrl.Builder

query

fun query(query: String?): HttpUrl.Builder

removeAllEncodedQueryParameters

fun removeAllEncodedQueryParameters(encodedName: String): HttpUrl.Builder

removeAllQueryParameters

fun removeAllQueryParameters(name: String): HttpUrl.Builder

removePathSegment

fun removePathSegment(index: Int): HttpUrl.Builder

scheme

fun scheme(scheme: String): HttpUrl.Builder

setEncodedPathSegment

fun setEncodedPathSegment(index: Int, encodedPathSegment: String): HttpUrl.Builder

setEncodedQueryParameter

fun setEncodedQueryParameter(encodedName: String, encodedValue: String?): HttpUrl.Builder

setPathSegment

fun setPathSegment(index: Int, pathSegment: String): HttpUrl.Builder

setQueryParameter

fun setQueryParameter(name: String, value: String?): HttpUrl.Builder

toString

fun toString(): String

username

fun username(username: String): HttpUrl.Builder