vert-x3 / vertx-4-migration-guide

Migration to Vert.x 4 guide
https://vert-x3.github.io/vertx-4-migration-guide/index.html
20 stars 16 forks source link

HttpMethod is not an enum anymore. How to use the HttpMethod interface in 4.0.0? #60

Closed j-pel closed 3 years ago

j-pel commented 3 years ago

Questions

In Vert.x 3.9.4 we had: app.route().handler(CorsHandler.create(".*.").allowedMethod(HttpMethod.GET));

What's the equivalent form in Vert.x 4.0.0?

Version

Vert.x 4.0.0

vietj commented 3 years ago

Can you handle this @pmlopes ?

pmlopes commented 3 years ago

This was mentioned on the wiki:

https://github.com/vert-x3/wiki/wiki/4.0.0-Deprecations-and-breaking-changes#%EF%B8%8F-httpmethod-is-an-interface

The enum is now an interface, the usage is almost the same:

router.route().handler(CorsHandler.create("http://vertx\\.io").allowedMethod(HttpMethod.PUT));
vietj commented 3 years ago

can you add a note to the migration guide @pmlopes about this if that's not present already ?

pmlopes commented 3 years ago

It is already present as a full description here: https://github.com/vert-x3/vertx-4-migration-guide/blob/ebe693ccbdd49e0d4082788d7c6d5c7e21f2ac5d/asciidoc/modules/con_mg_generic-updates-in-vertx-http.adoc#httpmethod-is-available-as-a-interface

vietj commented 3 years ago

thanks!

On Wed, Jan 13, 2021 at 10:09 AM Paulo Lopes notifications@github.com wrote:

It is already present as a full description here: https://github.com/vert-x3/vertx-4-migration-guide/blob/ebe693ccbdd49e0d4082788d7c6d5c7e21f2ac5d/asciidoc/modules/con_mg_generic-updates-in-vertx-http.adoc#httpmethod-is-available-as-a-interface

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vert-x3/vertx-4-migration-guide/issues/60#issuecomment-759311911, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABXDCVXV22RWYGWWIL3OBLSZVPN7ANCNFSM4V7V32AQ .

j-pel commented 3 years ago

Checked, it works. Thanks.

The issue is related to the helper files for the VSCode interface and is still there: image