ApiServerHttp constructor
ApiServerHttp({
- required String name,
- required String host,
- int? port,
- String scheme = "http",
- ApiServerHttpClientBuilder? builder,
- ApiServerUriBuilder? uriBuilder,
- ApiServerHttpRequestBuilder? requestBuilder,
- ApiServerHttpResponseParser? responseParser,
Construct ApiServer
In name
, specify a logical name of the server.
In host
, specify the hostname of the server.
In port
, specify the port of the server.
In scheme
, specify the scheme of the uri.
In builder
, specify the process of building HttpClient to communicate with the server.
In uriBuilder
, specify the process of building uri to request to the server.
In requestBuilder
, specify the process of building HttpClientRequest, an HTTP request to the server.
In responseParser
, specify the parsing process from HttpClientResponse, an HTTP response from the server, to the output DTO.
Implementation
ApiServerHttp(
{
required String name,
required String host,
int? port,
String scheme = "http",
ApiServerHttpClientBuilder? builder,
ApiServerUriBuilder? uriBuilder,
ApiServerHttpRequestBuilder? requestBuilder,
ApiServerHttpResponseParser? responseParser
}
): _requestBuilder = requestBuilder,
_responseParser = responseParser,
super(name:name, host:host, port:port, scheme:scheme, uriBuilder:uriBuilder)
{
if(builder != null)builder(_client);
}