setAll

abstract fun setAll(headers: Map<String, String>)

Sets all the given headers.

Standard headers should usually be set using type-safe accessors, unless setting them in a batch is necessary. Therefore, this untyped approach should mostly be used for custom headers.

The specification is rather imprecise as to which frames may or may not contain custom headers. The following sentence opens the door for custom headers in all frames:

Finally, STOMP servers MAY use additional headers to give access to features like persistence or expiration. Consult your server's documentation for details.

For this reason, custom headers are allowed in every frame here. Please use this method carefully.