Created
September 25, 2014 10:10
-
-
Save miere/3ef15b916cdaaae1896c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.undertow.server.HttpHandler; | |
import io.undertow.server.HttpServerExchange; | |
import io.undertow.server.RoutingHandler; | |
import org.junit.Test; | |
public class RoutingHandlerTest { | |
@Test | |
public void ensureItsPossibleToHandlePostAndGetToSameURL() { | |
final MyHandler myHandler = new MyHandler(); | |
final RoutingHandler router = new RoutingHandler(); | |
router.add( "GET", "/sameurl/", myHandler ); | |
router.add( "POST", "/sameurl/", myHandler ); | |
router.add( "GET", "/sameurl/{id}/", myHandler ); | |
} | |
} | |
class MyHandler implements HttpHandler { | |
@Override | |
public void handleRequest( final HttpServerExchange exchange ) throws Exception { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment