org.apache.hc.core5.http

## Interface HeaderElement

- All Known Implementing Classes:
    BasicHeaderElement

      public interface HeaderElement

  Represents an element of an HTTP `header` value consisting of a name / value pair and a number of optional name / value parameters.
  Since:
    4.0

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getName()` Returns header element name.
    `NameValuePair` | `getParameter(int index)` Returns parameter with the given index.
    `NameValuePair` | `getParameterByName(String name)` Returns the first parameter with the given name.
    `int` | `getParameterCount()` Returns the total count of parameters.
    `NameValuePair[]` | `getParameters()` Returns an array of name / value pairs.
    `String` | `getValue()` Returns header element value.

- - ### Method Detail

    - #### getName

          String getName()

      Returns header element name.
      Returns:
        header element name

    - #### getValue

          String getValue()

      Returns header element value.
      Returns:
        header element value

    - #### getParameters

          NameValuePair[] getParameters()

      Returns an array of name / value pairs.
      Returns:
        array of name / value pairs

    - #### getParameterByName

          NameValuePair getParameterByName(String name)

      Returns the first parameter with the given name.
      Parameters:
        `name` - parameter name
      Returns:
        name / value pair

    - #### getParameterCount

          int getParameterCount()

      Returns the total count of parameters.
      Returns:
        parameter count

    - #### getParameter

          NameValuePair getParameter(int index)

      Returns parameter with the given index.
      Parameters:
        `index` - index
      Returns:
        name / value pair

Copyright © 2005–2022 The Apache Software Foundation. All rights reserved.