addOns/network/src/main/java/org/zaproxy/addon/network/ExtensionNetwork.java
/**
     * Creates a HTTP server.
     *
     * <p>The CONNECT requests are automatically handled as is the possible TLS upgrade.
     *
     * @param handler the message handler.
     * @return the server.
     * @throws NullPointerException if the given handler is {@code null}.
     * @since 0.1.0
     */
Creates a HTTP server.
The CONNECT requests are automatically handled as is the possible TLS upgrade.

@param handler the message handler.
@return the server.
@throws NullPointerException if the given handler is  null.
Creates a HTTP server . The CONNECT requests are automatically handled as is the possible TLS upgrade . @param handler the message handler . @return the server . @throws NullPointerException if the given handler is null .
public Server createHttpServer(HttpMessageHandler handler) {
        Objects.requireNonNull(handler);
        List<HttpMessageHandler> handlers =
                Arrays.asList(ConnectReceivedHandler.getSetAndOverrideInstance(), handler);
        return createHttpServer(() -> new MainServerHandler(handlers));
    }
public Server createHttpServer ( HttpMessageHandler handler ) { Objects . requireNonNull ( handler ) ; List < HttpMessageHandler > handlers = Arrays . asList ( ConnectReceivedHandler . getSetAndOverrideInstance ( ) , handler ) ; return createHttpServer ( ( ) -> new MainServerHandler ( handlers ) ) ; }
Creates a HTTP server.
Creates a HTTP server .