All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.opentelemetry.instrumentation.apachehttpclient.v4_3.HttpHeaderSetter Maven / Gradle / Ivy

The newest version!
/*
 * Copyright The OpenTelemetry Authors
 * SPDX-License-Identifier: Apache-2.0
 */

package io.opentelemetry.instrumentation.apachehttpclient.v4_3;

import io.opentelemetry.context.propagation.TextMapSetter;
import javax.annotation.Nullable;
import org.apache.http.client.methods.HttpRequestWrapper;

enum HttpHeaderSetter implements TextMapSetter {
  INSTANCE;

  @Override
  public void set(@Nullable HttpRequestWrapper carrier, String key, String value) {
    if (carrier != null) {
      carrier.setHeader(key, value);
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy