Skip to content
instance method

URI::Generic#query=

(::String? v) -> ::String?
query=(v)

Args

v

String

Description

Public setter for the query component v.

Usage

Example
require 'uri'

uri = URI.parse("http://my.example.com/?id=25")
uri.query = "id=1"
uri.to_s  #=> "http://my.example.com/?id=1"
See also #port= #relative? #path= #replace! also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0