FastCGIServerResponse
public class FastCGIServerResponse : ServerResponse
The FastCGIServerRequest class implements the ServerResponse protocol
for incoming HTTP requests that come in over a FastCGI connection.
-
The headers to send back as part of the HTTP response.
Declaration
Swift
public var headers: HeadersContainer -
The status code to send in the HTTP response.
Declaration
Swift
public var statusCode: HTTPStatusCode? { get set } -
Add a string to the body of the HTTP response and complete sending the HTTP response
Throws
Socket.error if an error occurred while writing to the socket
Declaration
Swift
public func end(text: String) throwsParameters
textThe String to add to the body of the HTTP response.
-
Add a string to the body of the HTTP response.
Throws
Socket.error if an error occurred while writing to the socket
Declaration
Swift
public func write(from string: String) throwsParameters
stringThe String data to be added.
-
Add bytes to the body of the HTTP response.
Throws
Socket.error if an error occurred while writing to the socket
Declaration
Swift
public func write(from data: Data) throwsParameters
dataThe Data struct that contains the bytes to be added.
-
Complete sending the HTTP response
Throws
Socket.error if an error occurred while writing to a socketDeclaration
Swift
public func end() throws -
External message write for multiplex rejection
Declaration
Swift
public func rejectMultiplexConnecton(requestId: UInt16) throwsParameters
requestIdThe id of the request to reject.
-
External message write for role rejection
Declaration
Swift
public func rejectUnsupportedRole() throws -
Reset the request for reuse in Keep alive
Declaration
Swift
public func reset()
View on GitHub
FastCGIServerResponse Class Reference