@MustBeClosed
    public static SafeCloseable withHeader(CharSequence name, Object value) {
        requireNonNull(name, "name");
        requireNonNull(value, "value");
        return withHeaders(headersBuilder -> {
            headersBuilder.setObject(name, value);
        });
    }
Sets the specified HTTP header in a thread-local variable so that the header is sent by the client call
made from the current thread. Use the {@code try-with-resources} block with the returned
{@link SafeCloseable} to unset the thread-local variable automatically:
<pre>{@code
import static com.linecorp.armeria.common.HttpHeaderNames.CONTENT_TYPE;
import static com.linecorp.armeria.common.MediaType.JSON_UTF_8;

try (SafeCloseable ignored = withHeader(CONTENT_TYPE, JSON_UTF_8)) {
    client.executeSomething(..);
}
}</pre>
You can also nest the header manipulation:
<pre>{@code
import static com.linecorp.armeria.common.HttpHeaderNames.AUTHORIZATION;
import static com.linecorp.armeria.common.HttpHeaderNames.CONTENT_TYPE;
import static com.linecorp.armeria.common.MediaType.JSON_UTF_8;

try (SafeCloseable ignored = withHeader(CONTENT_TYPE, JSON_UTF_8)) {
    for (String secret : secrets) {
        try (SafeCloseable ignored2 = withHeader(AUTHORIZATION, secret)) {
            // Both CONTENT_TYPE and AUTHORIZATION will be set.
            client.executeSomething(..);
        }
    }
}
}</pre>

<p>Note that the specified header will be stored into
{@link ClientRequestContext#additionalRequestHeaders()} which takes precedence over
{@link HttpRequest#headers()}.

@see #withHeaders(Consumer)
core/src/main/java/com/linecorp/armeria/client/Clients.java