HTTPService
open class HTTPService : NetService
The HTTPService class provide a lightweight HTTPServer.
-
The type of the published service.
Declaration
Swift
open class var type: String { get }
-
The port on which the service is listening for connections. The default value is 8080.
Declaration
Swift
open class var defaultPort: Int32 { get }
-
The root document of HTML.
Declaration
Swift
open class var defaultDocument: String { get }
-
Represents the GET method.
Declaration
Swift
open func get(_ request: HTTPRequest, client: NetClient)
-
Represents the POST method.
Declaration
Swift
open func post(_ request: HTTPRequest, client: NetClient)
-
Represents the PUT method.
Declaration
Swift
open func put(_ request: HTTPRequest, client: NetClient)
-
Represents the DELETE method.
Declaration
Swift
open func delete(_ request: HTTPRequest, client: NetClient)
-
Represents the HEAD method.
Declaration
Swift
open func head(_ request: HTTPRequest, client: NetClient)
-
Represents the OPTIONS method.
Declaration
Swift
open func options(_ requst: HTTPRequest, client: NetClient)
-
Represents the TRACE method.
Declaration
Swift
open func trace(_ request: HTTPRequest, client: NetClient)
-
Represents the CONNECT method.
Declaration
Swift
open func connect(_ request: HTTPRequest, client: NetClient)