HttpUrlBuilder
A builder for constructing HTTP URLs. This class allows for the configuration of scheme, host, port, path and query parameters to build a URI.
This class provides a fluent interface for method chaining.
Example of usage: url("https://api.tomtom.com/search/2/search/amsterdam.json?key=123&lat=52.3&lon=5.1") { path("/search/2/search") queryParams { remove("key") "token" to "xyz" } } // -> https://api.tomtom.com/search/2/search/amsterdam.json?lat=52.3&lon=5.1&token=xyz
Important: This is a Public Preview API. It may be changed or removed at any time.
Types
Functions
Adds multiple query parameters to the URL.
Adds a query parameter to the URL or replaces it if it already exists.
Adds a query parameter to the URL.
Sets the host of the URL.
Sets the path of the URL. Optional parameter. Default value is /.
Sets the port of the URL. Optional parameter.
Sets the query string of the URL. Optional parameter.
Applies a configuration block to the query parameters of the URL.
Removes all query parameters from the URL.
Removes a query parameter from the URL.
Sets the scheme of the URL. Optional parameter. Default value is https.