Close

Query String

[Last Updated: Feb 11, 2016]

Web 

A query string is the part of URL containing key-value pairs.

The query string is needed when the client request wants to pass some extra information which cannot fit conveniently into a hierarchical path structure of URL.

Based on received key-value pairs as query string the server can fine tune, paginate or filter the response in preparing dynamic pages.

Query String format:

field1=value1&field2=value2&field3=value3

Example

The following example URL request supposedly asks the server to return all users living in the state TX.

http://www.example.com/users?state=TX