FastCGIServerRequest
public class FastCGIServerRequest : ServerRequest
The FastCGIServerRequest class implements the ServerRequest
protocol
for incoming HTTP requests that come in over a FastCGI connection.
-
The IP address of the client
Declaration
Swift
public private(set) var remoteAddress: String { get }
-
Major version of HTTP of the request
Declaration
Swift
public private(set) var httpVersionMajor: UInt16? { get }
-
Minor version of HTTP of the request
Declaration
Swift
public private(set) var httpVersionMinor: UInt16? { get }
-
The set of HTTP headers received with the incoming request
Declaration
Swift
public var headers: HeadersContainer
-
The set of non-HTTP headers received with the incoming request
Declaration
Swift
public var fastCGIHeaders: HeadersContainer
-
The HTTP Method specified in the request
Declaration
Swift
public private(set) var method: String { get }
-
Declaration
Swift
public private(set) var urlURL: URL { get }
-
The URL from the request in string form This contains just the path and query parameters starting with ‘/’ Use ‘urlURL’ for the full URL
Declaration
Swift
@available(*, deprecated, message: "This contains just the path and query parameters starting with '/'. use 'urlURL' instead") public var urlString: String { get }
-
The URL from the request in UTF-8 form This contains just the path and query parameters starting with ‘/’ Use ‘urlURL’ for the full URL
Declaration
Swift
public var url: Data { get }
-
The URL from the request as URLComponents URLComponents has a memory leak on linux as of swift 3.0.1. Use ‘urlURL’ instead
Declaration
Swift
@available(*, deprecated, message: "URLComponents has a memory leak on linux as of swift 3.0.1. use 'urlURL' instead") public lazy var urlComponents: URLComponents { get set }
-
The request ID established by the FastCGI client.
Declaration
Swift
public private(set) var requestId: UInt16 { get }
-
An array of request ID’s that are not our primary one. When the main request is done, the FastCGIServer can reject the extra requests as being unusable.
Declaration
Swift
public private(set) var extraRequestIds: [UInt16] { get }
-
HTTP parser error types
See moreDeclaration
Swift
public enum FastCGIParserErrorType
-
Undocumented
Declaration
Swift
public init()
-
Read data from the body of the request
Throws
Socket.error if an error occurred while reading from the socket.
Declaration
Swift
public func read(into data: inout Data) throws -> Int
Parameters
data
A Data struct to hold the data read in.
Return Value
The number of bytes read.
-
Read all of the data in the body of the request
Throws
Socket.error if an error occurred while reading from the socket.
Declaration
Swift
public func readAllData(into data: inout Data) throws -> Int
Parameters
data
A Data struct to hold the data read in.
Return Value
The number of bytes read.
-
Read a string from the body of the request.
Throws
Socket.error if an error occurred while reading from the socket.Declaration
Swift
public func readString() throws -> String?
Return Value
An Optional string.