/** * Set whether form attributes will be added to the request parameters * @param mergeFormAttributes true if they should be merged * @return reference to this for fluency */ public io.vertx.rxjava.ext.web.handler.BodyHandler setMergeFormAttributes(boolean mergeFormAttributes) { delegate.setMergeFormAttributes(mergeFormAttributes); return this; }
/** * Set whether form attributes will be added to the request parameters * @param mergeFormAttributes true if they should be merged * @return reference to this for fluency */ public io.vertx.rxjava.ext.web.handler.BodyHandler setMergeFormAttributes(boolean mergeFormAttributes) { delegate.setMergeFormAttributes(mergeFormAttributes); return this; }
@Test public void testFormMultipartFormDataMergeAttributes() throws Exception { router.clear(); router.route().handler(BodyHandler.create().setMergeFormAttributes(true)); testFormMultipartFormData(true); }
@Test public void testFormMultipartFormDataNoMergeAttributes() throws Exception { router.clear(); router.route().handler(BodyHandler.create().setMergeFormAttributes(false)); testFormMultipartFormData(false); }
router.route().handler(BodyHandler.create(false).setMergeFormAttributes(true)); router.route("/toBeRerouted").handler(rc -> { rc.reroute("/rerouted");
private void testFormMultipartFormDataWithAllowedFilesUploadFalse(boolean mergeAttributes) throws Exception { String fileName = "test.bin"; router.clear(); router.route().handler(BodyHandler.create(false).setMergeFormAttributes(mergeAttributes)).handler(rc -> { MultiMap attrs = rc.request().formAttributes(); assertNotNull(attrs);
@Test public void testFormMultipartFormDataMergeAttributes() throws Exception { router.clear(); router.route().handler(BodyHandler.create().setMergeFormAttributes(true)); testFormMultipartFormData(true); }
@Test public void testFormMultipartFormDataNoMergeAttributes() throws Exception { router.clear(); router.route().handler(BodyHandler.create().setMergeFormAttributes(false)); testFormMultipartFormData(false); }
router.route().handler(BodyHandler.create(false).setMergeFormAttributes(true)); router.route("/toBeRerouted").handler(rc -> { rc.reroute("/rerouted");
private void testFormMultipartFormDataWithAllowedFilesUploadFalse(boolean mergeAttributes) throws Exception { String fileName = "test.bin"; router.clear(); router.route().handler(BodyHandler.create(false).setMergeFormAttributes(mergeAttributes)).handler(rc -> { MultiMap attrs = rc.request().formAttributes(); assertNotNull(attrs);