libcurl based HTTP(S) Client for Swift.
- Add
SeeURL
toPackage.swift
of your project.
import PackageDescription
let package = Package(
dependencies: [
.Package(url: "https://github.com/shiroyagicorp/swift-seeurl.git", from: "1.9.0")
]
)
Swift 5.0 or later on Linux, you might need to install libcurl by apt-get install libcurl4-openssl-dev
.
import SeeURL
let result = try HTTPClient.sendRequest(method: "GET", url: "https://google.com")
print(result.statusCode, result.body)
MIT