Closed Pakho closed 4 years ago
Hi, this is a bug in the auto generated docs, the enum is loaded using:
import { HttpMethod } from '@vertx/core/enums';
// and the this should be right:
router.route().handler(CorsHandler.create("vertx\\.io").allowedMethod(HttpMethod.GET));
The new docs, avoid duplicate the official vert.x docs, instead they explain how the mapping works and point to the source.
I cannot create a CorsHandler as mentioned in the docs on both vertx and es4x.
Here is my code:
It gives the following error:
Failed in deploying verticle caused by TypeError: invokeMember (allowedMethod) on io.vertx.ext.web.handler.impl.CorsHandlerImpl@4a79cd2 failed due to: Cannot convert 'GET'(language: Java, type: java.lang.String) to Java type 'io.vertx.core.http.HttpMethod': Unsupported target type.
What am I missing?