2016-01-09 03:03:50 +00:00
|
|
|
urilib
|
|
|
|
======
|
|
|
|
[RFC-3986](https://tools.ietf.org/html/rfc3986) URI Library for Erlang.
|
|
|
|
|
2016-01-09 04:27:38 +00:00
|
|
|
[![Build Status](https://travis-ci.org/gmr/urilib.svg?branch=master)](https://travis-ci.org/gmr/urilib) [![codecov.io](https://codecov.io/github/gmr/urilib/coverage.svg?branch=master)](https://codecov.io/github/gmr/urilib?branch=master)
|
2016-01-09 04:27:04 +00:00
|
|
|
|
2016-01-09 04:40:55 +00:00
|
|
|
Example Usage
|
|
|
|
-------------
|
2016-01-22 04:09:37 +00:00
|
|
|
|
2016-01-09 04:40:55 +00:00
|
|
|
```erlang
|
2016-01-22 04:09:37 +00:00
|
|
|
Eshell V7.2.1 (abort with ^G)
|
|
|
|
1> urilib:build({http, {{"guest", "guest"}, "localhost", 15672}, "/api/queues", [{"name", "test"}], undefined}).
|
|
|
|
"http://guest:guest@localhost:15672/api/queues?name=test"
|
2016-01-09 04:40:55 +00:00
|
|
|
|
2016-01-22 04:09:37 +00:00
|
|
|
2> urilib:build({http, "guest", "guest", "localhost", 15672, "/api/queues", [{"name", "test"}], undefined}).
|
|
|
|
"http://guest:guest@localhost:15672/api/queues?name=test"
|
2016-01-09 04:40:55 +00:00
|
|
|
|
2016-01-22 04:09:37 +00:00
|
|
|
3> urilib:parse("http://guest:guest@localhost:15672/api/queues?name=test").
|
|
|
|
{http,{{"guest","guest"},"localhost",15672},
|
|
|
|
"/api/queues",
|
|
|
|
[{"name","test"}],
|
|
|
|
undefined}
|
2016-01-09 04:40:55 +00:00
|
|
|
```
|