/** * Set the HTTP methods that this content generator should support. * <p>Default is GET, HEAD and POST for simple form controller types; * unrestricted for general controllers and interceptors. */ public final void setSupportedMethods(@Nullable String... methods) { if (!ObjectUtils.isEmpty(methods)) { this.supportedMethods = new LinkedHashSet<>(Arrays.asList(methods)); } else { this.supportedMethods = null; } initAllowHeader(); }
/** * Create a new WebContentGenerator. * @param restrictDefaultSupportedMethods {@code true} if this * generator should support HTTP methods GET, HEAD and POST by default, * or {@code false} if it should be unrestricted */ public WebContentGenerator(boolean restrictDefaultSupportedMethods) { if (restrictDefaultSupportedMethods) { this.supportedMethods = new LinkedHashSet<>(4); this.supportedMethods.add(METHOD_GET); this.supportedMethods.add(METHOD_HEAD); this.supportedMethods.add(METHOD_POST); } initAllowHeader(); }
/** * Set the HTTP methods that this content generator should support. * <p>Default is GET, HEAD and POST for simple form controller types; * unrestricted for general controllers and interceptors. */ public final void setSupportedMethods(@Nullable String... methods) { if (!ObjectUtils.isEmpty(methods)) { this.supportedMethods = new LinkedHashSet<>(Arrays.asList(methods)); } else { this.supportedMethods = null; } initAllowHeader(); }
/** * Create a new WebContentGenerator. * @param restrictDefaultSupportedMethods {@code true} if this * generator should support HTTP methods GET, HEAD and POST by default, * or {@code false} if it should be unrestricted */ public WebContentGenerator(boolean restrictDefaultSupportedMethods) { if (restrictDefaultSupportedMethods) { this.supportedMethods = new LinkedHashSet<>(4); this.supportedMethods.add(METHOD_GET); this.supportedMethods.add(METHOD_HEAD); this.supportedMethods.add(METHOD_POST); } initAllowHeader(); }
/** * Set the HTTP methods that this content generator should support. * <p>Default is GET, HEAD and POST for simple form controller types; * unrestricted for general controllers and interceptors. */ public final void setSupportedMethods(String... methods) { if (!ObjectUtils.isEmpty(methods)) { this.supportedMethods = new LinkedHashSet<String>(Arrays.asList(methods)); } else { this.supportedMethods = null; } initAllowHeader(); }
/** * Create a new WebContentGenerator. * @param restrictDefaultSupportedMethods {@code true} if this * generator should support HTTP methods GET, HEAD and POST by default, * or {@code false} if it should be unrestricted */ public WebContentGenerator(boolean restrictDefaultSupportedMethods) { if (restrictDefaultSupportedMethods) { this.supportedMethods = new LinkedHashSet<String>(4); this.supportedMethods.add(METHOD_GET); this.supportedMethods.add(METHOD_HEAD); this.supportedMethods.add(METHOD_POST); } initAllowHeader(); }