set-query-param ( url value key -- url )
Furnace framework > URL objects

Prev:query-param ( url key -- value )
Next:url-addr ( url -- addr )


Inputs and outputs
urlan url
valuean object
keya string

Word description
Sets a query parameter. The value can be any object supported by present, or f, in which case the key is removed.

This word always returns the same URL object that was input. This allows for a ``pipeline'' coding style, where several query parameters are set in a row. Since it mutates the input object, you must clone it first if it is literal, as in the below example.

USING: kernel http.client urls ; URL"" clone "concatenative programming (NSFW)" "query" set-query-param "1" "adult_ok" set-query-param http-get

(For a complete Yahoo! search web service implementation, see the yahoo vocabulary.)

Side effects
Modifies url