Skip to content

okhttp / okhttp3 / HttpUrl / Builder

Builder

class Builder

Constructors

Name Summary
<init> Builder()

Functions

Name Summary
addEncodedPathSegment fun addEncodedPathSegment(encodedPathSegment:String): Builder
addEncodedPathSegments 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.fun addEncodedPathSegments(encodedPathSegments:String): Builder
addEncodedQueryParameter Adds the pre-encoded query parameter to this URL’s query string.fun addEncodedQueryParameter(encodedName:String, encodedValue:String?): Builder
addPathSegment fun addPathSegment(pathSegment:String): Builder
addPathSegments 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.fun addPathSegments(pathSegments:String): Builder
addQueryParameter Encodes the query parameter using UTF-8 and adds it to this URL’s query string.fun addQueryParameter(name:String, value:String?): Builder
build fun build():HttpUrl
encodedFragment fun encodedFragment(encodedFragment:String?): Builder
encodedPassword fun encodedPassword(encodedPassword:String): Builder
encodedPath fun encodedPath(encodedPath:String): Builder
encodedQuery fun encodedQuery(encodedQuery:String?): Builder
encodedUsername fun encodedUsername(encodedUsername:String): Builder
fragment fun fragment(fragment:String?): Builder
host fun host(host:String): Builder
password fun password(password:String): Builder
port fun port(port:Int): Builder
query fun query(query:String?): Builder
removeAllEncodedQueryParameters fun removeAllEncodedQueryParameters(encodedName:String): Builder
removeAllQueryParameters fun removeAllQueryParameters(name:String): Builder
removePathSegment fun removePathSegment(index:Int): Builder
scheme fun scheme(scheme:String): Builder
setEncodedPathSegment fun setEncodedPathSegment(index:Int, encodedPathSegment:String): Builder
setEncodedQueryParameter fun setEncodedQueryParameter(encodedName:String, encodedValue:String?): Builder
setPathSegment fun setPathSegment(index:Int, pathSegment:String): Builder
setQueryParameter fun setQueryParameter(name:String, value:String?): Builder
toString fun toString():String
username fun username(username:String): Builder