/** * Set the (new) value of the {@code Access-Control-Allow-Origin} response header. */ public void setAccessControlAllowOrigin(@Nullable String allowedOrigin) { setOrRemove(ACCESS_CONTROL_ALLOW_ORIGIN, allowedOrigin); }
/** * Set the (new) value of the {@code Upgrade} header. */ public void setUpgrade(@Nullable String upgrade) { setOrRemove(UPGRADE, upgrade); }
/** * Set the (new) value of the {@code Cache-Control} header. */ public void setCacheControl(@Nullable String cacheControl) { setOrRemove(CACHE_CONTROL, cacheControl); }
/** * Set the (new) value of the {@code Origin} header. */ public void setOrigin(@Nullable String origin) { setOrRemove(ORIGIN, origin); }
/** * Set the (new) value of the {@code Pragma} header. */ public void setPragma(@Nullable String pragma) { setOrRemove(PRAGMA, pragma); }
/** * Set the {@link Locale} of the content language, * as specified by the {@literal Content-Language} header. * <p>Use {@code set(CONTENT_LANGUAGE, ...)} if you need * to set multiple content languages.</p> * @since 5.0 */ public void setContentLanguage(@Nullable Locale locale) { setOrRemove(CONTENT_LANGUAGE, (locale != null ? locale.toLanguageTag() : null)); }
/** * Set the (new) location of a resource, * as specified by the {@code Location} header. */ public void setLocation(@Nullable URI location) { setOrRemove(LOCATION, (location != null ? location.toASCIIString() : null)); }
/** * Set a configured {@link CacheControl} instance as the * new value of the {@code Cache-Control} header. * @since 5.0.5 */ public void setCacheControl(CacheControl cacheControl) { setOrRemove(CACHE_CONTROL, cacheControl.getHeaderValue()); }
/** * Set the (new) value of the {@code Access-Control-Allow-Origin} response header. */ public void setAccessControlAllowOrigin(@Nullable String allowedOrigin) { setOrRemove(ACCESS_CONTROL_ALLOW_ORIGIN, allowedOrigin); }
/** * Set the (new) value of the {@code Access-Control-Request-Method} request header. */ public void setAccessControlRequestMethod(@Nullable HttpMethod requestMethod) { setOrRemove(ACCESS_CONTROL_REQUEST_METHOD, (requestMethod != null ? requestMethod.name() : null)); }
/** * Set the (new) value of the {@code Origin} header. */ public void setOrigin(@Nullable String origin) { setOrRemove(ORIGIN, origin); }
/** * Set the (new) value of the {@code Cache-Control} header. */ public void setCacheControl(@Nullable String cacheControl) { setOrRemove(CACHE_CONTROL, cacheControl); }
/** * Set the (new) value of the {@code Pragma} header. */ public void setPragma(@Nullable String pragma) { setOrRemove(PRAGMA, pragma); }
/** * Set the (new) value of the {@code Upgrade} header. */ public void setUpgrade(@Nullable String upgrade) { setOrRemove(UPGRADE, upgrade); }
/** * Set the (new) location of a resource, * as specified by the {@code Location} header. */ public void setLocation(@Nullable URI location) { setOrRemove(LOCATION, (location != null ? location.toASCIIString() : null)); }
/** * Set the {@link Locale} of the content language, * as specified by the {@literal Content-Language} header. * <p>Use {@code set(CONTENT_LANGUAGE, ...)} if you need * to set multiple content languages.</p> * @since 5.0 */ public void setContentLanguage(@Nullable Locale locale) { setOrRemove(CONTENT_LANGUAGE, (locale != null ? locale.toLanguageTag() : null)); }
/** * Set a configured {@link CacheControl} instance as the * new value of the {@code Cache-Control} header. * @since 5.0.5 */ public void setCacheControl(CacheControl cacheControl) { setOrRemove(CACHE_CONTROL, cacheControl.getHeaderValue()); }
/** * Set the (new) value of the {@code Access-Control-Request-Method} request header. */ public void setAccessControlRequestMethod(@Nullable HttpMethod requestMethod) { setOrRemove(ACCESS_CONTROL_REQUEST_METHOD, (requestMethod != null ? requestMethod.name() : null)); }