Contains information about the current HTTP request.

{% assign id = request.params['id'] %}

<a href="{{ request.url | add_query: 'foo', 1 }}">Link</a>

Attributes

params

A dictionary of named parameter values for the current request.

params is a combination of URL query string parameters, form post parameters, and cookies.

path

The path of the current request URL.

/profile/

path_and_query

The path and query of the current request URL.

/profile/?foo=1&bar=something

query

The query part of the current request URL.

?foo=1&bar=something

url

The full URL of the current request.

http://www.example.com/profile/?foo=1&bar=something