Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for RFC 6570 #67

Merged
merged 12 commits into from May 21, 2012
5 changes: 5 additions & 0 deletions README.md
Expand Up @@ -21,6 +21,7 @@ support for URI templates.

- {Addressable::URI}
- {Addressable::Template}
- {Addressable::UriTemplate}

# Example usage

Expand Down Expand Up @@ -55,10 +56,14 @@ support for URI templates.
template = Addressable::Template.new(
"http://{host}/{-suffix|/|segments}?{-join|&|one,two,bogus}\#{fragment}"
)
template2 = Addressable::UriTemplate.new(
"http://{host}{/segments}/{?one,two,bogus}{#fragment}"
)
uri = Addressable::URI.parse(
"http://example.com/a/b/c/?one=1&two=2#foo"
)
template.extract(uri)
template2.extract(uri)
#=>
# {
# "host" => "example.com",
Expand Down