https://github.com/swirrl/grafter-url
Standalone clojure library to build URLs and process their components
https://github.com/swirrl/grafter-url
clojure uri url
Last synced: about 2 months ago
JSON representation
Standalone clojure library to build URLs and process their components
- Host: GitHub
- URL: https://github.com/swirrl/grafter-url
- Owner: Swirrl
- License: epl-1.0
- Created: 2015-04-13T10:28:51.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2019-10-28T12:51:29.000Z (about 6 years ago)
- Last Synced: 2024-03-15T14:20:44.848Z (almost 2 years ago)
- Topics: clojure, uri, url
- Language: Clojure
- Size: 25.4 KB
- Stars: 0
- Watchers: 18
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grafter-url
*DEPRECATED*
A standalone Clojure library to help generate URLs and access their
individual components.
grafter-url defines an `IURL` protocol which is extended to both
`java.net.URL`, `java.net.URI` and our own GrafterURL record type.
## Usage
````clojure
(-> (->url "http://www.example.org")
(append-path-segments ["path" "segments"])
(set-scheme "https")
(set-query-params {"query" "parameter"})
(set-url-fragment "fragment"))
;; => #
````
## java.net.URI Warning
Note
[there are bugs](https://blog.stackhunter.com/2014/03/31/encode-special-characters-java-net-uri/)
in java.net.URI related to double encoding, and also not encoding
certain query parameters. Some of these bugs may be inherited by the
functions in this API.
## TODO
- Incremental Construction
- API Improvements
- Bug Fixing
- Validation
## License
Copyright © 2015 Swirrl IT Ltd.
Distributed under the Eclipse Public License either version 1.0 or (at
your option) any later version.