HttpServer
A common trait for Http server implementations
Attributes
- Graph
-
- Supertypes
-
trait AutoCloseableclass Objecttrait Matchableclass Any
Members list
Value members
Abstract methods
Await and block until the server is terminated. If the server is already terminated, it will return immediately.
Await and block until the server is terminated. If the server is already terminated, it will return immediately.
Attributes
Return the local server address in (host):(port) format. e.g., localhost:8080. This method can be used for creating a new Http client for the server. For example:
Return the local server address in (host):(port) format. e.g., localhost:8080. This method can be used for creating a new Http client for the server. For example:
Netty.server.withRouter(router).start { server =>
Using.resource(Http.client.newSyncClient(server.localAddress)) { client =>
val resp = client.send(Http.GET("/hello"))
}
}
Attributes
Stop the server
Stop the server
Attributes
Concrete methods
Stop the server. When using Airframe DI, this method will be called automatically.
Stop the server. When using Airframe DI, this method will be called automatically.
Attributes
- Definition Classes
-
AutoCloseable