HTTP client foundation for Poikus iOS SDKs: pluggable transport, app-identity auth strategies (with an App Attest seam), pull-based access-token injection, RFC 7807 problem+json error mapping, and a bounded retry policy.
- iOS 16+ / macOS 13+
- Swift 6
- Depends on
PKSCore
.package(url: "https://github.com/POIKUS-LLC/PKSNetwork.git", .upToNextMinor(from: "0.1.0"))Inside the poikussource monorepo, Package.swift resolves PKSCore from GitHub by default (pinned
to a released version), so a fresh checkout is always prod-ready with no extra setup. To build against
the sibling pkscore folder on disk instead — e.g. while developing both packages together — export:
export PKS_LOCAL_PACKAGES=1before running swift build, swift test, or xcodebuild. This only applies inside the monorepo,
where the sibling package folders actually exist.
import PKSNetwork
let strategy = WebKeyStrategy(keyID: "key_id", secret: "raw_secret", origin: "https://example.com")
let client = HTTPClient(
baseURL: URL(string: "https://api.example.com")!,
transport: URLSessionTransport(),
identityStrategy: strategy,
tokenProvider: nil
)
let endpoint = Endpoint<MyResponse>(method: .get, path: "/v1/ping", authorization: .none)
let response = try await client.send(endpoint)Apache-2.0