Something went wrong. Try again.
A HTTP client built with and for PointFree's swift-dependencies
Something went wrong. Try again.
510 B · 23 lines
Swift
at main
123456789101112131415161718192021222324//// File.swift// //// Created by Woodrow Melling on 12/13/23.//
import Foundationimport HTTPTypes
public enum HTTPError: Error { case improperURL(URLComponents) case httpError(HTTPResponse.Status, Data?, HTTPFields) case invalidResponse(String) case expectedDataResponse case unknown(String) case encodingError(Error) case decodingError(Error)
static func httpError(_ response: HTTPResponse.Status) -> Self { .httpError(response, nil, HTTPFields()) }}