Skip to content

Instantly share code, notes, and snippets.

@miere
Created September 25, 2014 10:10
Show Gist options
  • Save miere/3ef15b916cdaaae1896c to your computer and use it in GitHub Desktop.
Save miere/3ef15b916cdaaae1896c to your computer and use it in GitHub Desktop.
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