Skip to content

okhttp / okhttp3 / HttpUrl / query

query

val query:String?

This URL’s query, like "abc" for http://host/?abc. Most callers should prefer queryParameterName and queryParameterValue because these methods offer direct access to individual query parameters.

URL query()
http://host/ null
http://host/? ""
http://host/?a=apple&k=key+lime "a=apple&k=key lime"
http://host/?a=apple&a=apricot "a=apple&a=apricot"
http://host/?a=apple&b "a=apple&b"