I
InsightNexus

HttpHeader (Azure SDK for Java Reference Documentation)

Author

Michael Gray

Published Feb 16, 2026

HttpHeader (Azure SDK for Java Reference Documentation)

  • public class HttpHeaderextends Object

    A single header within a HTTP request or response. If multiple header values are added to a HTTP request or response with the same name (case-insensitive), then the values will be appended to the end of the same Header with commas separating them.

    • Constructor Summary

      Constructors 
      Constructor and Description
      HttpHeader(String name, String value)

      Create a HttpHeader instance using the provided name and value.

    • Method Summary

    • Constructor Detail

      • HttpHeader

        public HttpHeader(String name, String value)

        Create a HttpHeader instance using the provided name and value.

        Parameters:
        name - the name
        value - the value
    • Method Detail

      • getValues

        public String[] getValues()

        Get the comma separated value as an array.

        Returns:
        the values of this Header that are separated by a comma
      • addValue

        public void addValue(String value)

        Add a new value to the end of the Header.

        Parameters:
        value - the value to add
      • toString

        public String toString()

        Get the String representation of the header.

        Overrides:
        toString in class Object
        Returns:
        the String representation of this HttpHeader

Copyright © 2020 Microsoft Corporation. All rights reserved.