[#96ACDE61D76968374D85A6D824A6D970A551D6C7]

Function url:: remove_query

Remove the query

Synopsis

            url&
remove_query() noexcept;
        

Description

If a query is present, it is removed. An empty query is distinct from having no query.

Example

assert( url( "http://www.example.com?id=42" ).remove_query().buffer() == "http://www.example.com" );

Postconditions

this->has_query() == false && this->params().empty()

Exception Safety

Throws nothing.

BNF

query = *( pchar / "/" / "?" ) query-param = key [ "=" value ] query-params = [ query-param ] *( "&" query-param )

Specification

  • 3.4. Query (rfc3986)
  • Query string (Wikipedia)