Skip to content
/ URI Public

C7.URI extension(parse uri with Node.js's http-parser) in Swift

License

Notifications You must be signed in to change notification settings

yoshiki/URI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

URI

C7.URI extension library.

URI allows you to parse URI string.

This library based on Zewo/URI.

Requirement

Build

Specify linker path that http-parser installed.

% swift build -Xlinker -L/usr/local/lib

Usage

import URI

do {
    let u = try URI("http://example.com/path?key=value")
    print(u.scheme)       // => Optional("http")
    print(u.host)         // => Optional("example.com")
    print(u.path)         // => Optional("/path")
    print(u.query["key"]) // => QueryField(values: [Optional("value")])
}

Swift version

See .swift-version

About

C7.URI extension(parse uri with Node.js's http-parser) in Swift

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages