From 1f7d3c3e510e508e03f5890b95da91e47efeebc9 Mon Sep 17 00:00:00 2001 From: Iceman Date: Fri, 29 Mar 2024 18:21:51 +0900 Subject: [PATCH] HTTPResponseStatus -> HTTPResponse.Status (#413) --- Sources/Hummingbird/Router/ResponseGenerator.swift | 2 +- Sources/Hummingbird/Router/Router.swift | 2 +- Sources/Hummingbird/Server/Response.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sources/Hummingbird/Router/ResponseGenerator.swift b/Sources/Hummingbird/Router/ResponseGenerator.swift index f7441d41a..1d3268709 100644 --- a/Sources/Hummingbird/Router/ResponseGenerator.swift +++ b/Sources/Hummingbird/Router/ResponseGenerator.swift @@ -54,7 +54,7 @@ extension ByteBuffer: ResponseGenerator { } } -/// Extend HTTPResponseStatus to conform to ResponseGenerator +/// Extend HTTPResponse.Status to conform to ResponseGenerator extension HTTPResponse.Status: ResponseGenerator { /// Generate response with this response status code public func response(from request: Request, context: some BaseRequestContext) -> Response { diff --git a/Sources/Hummingbird/Router/Router.swift b/Sources/Hummingbird/Router/Router.swift index 3f0a8de59..a0eb58cd2 100644 --- a/Sources/Hummingbird/Router/Router.swift +++ b/Sources/Hummingbird/Router/Router.swift @@ -26,7 +26,7 @@ import NIOCore /// router.get("string") { _, _ -> String in /// return "string" /// } -/// router.post("status") { _, _ -> HTTPResponseStatus in +/// router.post("status") { _, _ -> HTTPResponse.Status in /// return .ok /// } /// router.data("data") { request, context -> ByteBuffer in diff --git a/Sources/Hummingbird/Server/Response.swift b/Sources/Hummingbird/Server/Response.swift index 48a587ff1..8db639258 100644 --- a/Sources/Hummingbird/Server/Response.swift +++ b/Sources/Hummingbird/Server/Response.swift @@ -34,7 +34,7 @@ extension Response { /// must be used in the second request. case temporary - /// Associated `HTTPResponseStatus` for this redirect type. + /// Associated `HTTPResponse.Status` for this redirect type. public var status: HTTPResponse.Status { switch self { case .permanent: return .movedPermanently