Popularity
2.4
Growing
Activity
0.0
Stable
12
2
3

Monthly Downloads: 12
Programming language: Elixir
License: Do What The F*ck You Want To Public License
Tags: HTTP    
Latest version: v1.0.0

yuri alternatives and similar packages

Based on the "HTTP" category.
Alternatively, view yuri alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of yuri or a related project?

Add another 'HTTP' Package

README

YURI

Simple struct for representing URIs.

Similar to the standard lib URI struct, but provides Dict-like acces to the query string.

Usage

Add YURI to your mix.exs dependencies:

def deps do
  [{:yuri, "~> 1.0.0"}]
end

Download and compile:

$ mix deps.get

$ mix deps.compile

Begin URI manipulation:

uri = YURI.parse "http://www.example.com/example?a=1"

#Or with optional Dict of query parameters:
uri = YURI.parse "http://www.example.com/example?a=1", %{"b" => 2, "c" => 3}

to_string uri
#>> "http://www.example.com/example?a=1&b=2&c=3"

uri
|> YURI.put("a", "one")
|> YURI.delete("b")
|> YURI.put("d", "IV")
|> to_string
#>> "http://www.example.com/example?a=one&c=3&d=IV"

YURI.get uri, "a"
#>> "1"

to_string {uri | path: "/example/new"}
#>> "http://www.example.com/example/new?a=1&b=2&c=3"

uri.scheme
#>> "http"

YURI implements the Dict behaviour, all functions in the Dict module can be used to manipulate the query string. It also implements the Enumerable, Collectable, String.Chars and List.Chars protocols.

Other parts of the URI can be accessed using standard struct syntax.

License

Copyright © 2015 Ookami <[email protected]>

This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, as published by Sam Hocevar. See the LICENSE file or WTFPL homepage for more details.


*Note that all licence references and agreements mentioned in the yuri README section above are relevant to that project's source code only.