org.apache.hc.core5.http.message

## Class MessageSupport

- java.lang.Object
- - org.apache.hc.core5.http.message.MessageSupport

-     public class MessageSupport
      extends Object

  Support methods for HTTP message processing.
  Since:
    5.0

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `addContentEncodingHeader(HttpMessage message, EntityDetails entity)`
    `static void` | `addContentTypeHeader(HttpMessage message, EntityDetails entity)`
    `static void` | `addTrailerHeader(HttpMessage message, EntityDetails entity)`
    `static boolean` | `canResponseHaveBody(String method, HttpResponse response)`
    `static Header` | `format(String name, Set<String> tokens)`
    `static Header` | `format(String name, String... tokens)`
    `static void` | `formatTokens(CharArrayBuffer dst, Set<String> tokens)`
    `static void` | `formatTokens(CharArrayBuffer dst, String... tokens)`
    `static Iterator<HeaderElement>` | `iterate(MessageHeaders headers, String name)`
    `static HeaderElement[]` | `parse(Header header)`
    `static Set<String>` | `parseTokens(CharSequence src, ParserCursor cursor)`
    `static Set<String>` | `parseTokens(Header header)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### formatTokens

          public static void formatTokens(CharArrayBuffer dst,
                                          String... tokens)

    - #### formatTokens

          public static void formatTokens(CharArrayBuffer dst,
                                          Set<String> tokens)

    - #### format

          public static Header format(String name,
                                      Set<String> tokens)

    - #### format

          public static Header format(String name,
                                      String... tokens)

    - #### parseTokens

          public static Set<String> parseTokens(CharSequence src,
                                                ParserCursor cursor)

    - #### parseTokens

          public static Set<String> parseTokens(Header header)

    - #### addContentTypeHeader

          public static void addContentTypeHeader(HttpMessage message,
                                                  EntityDetails entity)

    - #### addContentEncodingHeader

          public static void addContentEncodingHeader(HttpMessage message,
                                                      EntityDetails entity)

    - #### addTrailerHeader

          public static void addTrailerHeader(HttpMessage message,
                                              EntityDetails entity)

    - #### iterate

          public static Iterator<HeaderElement> iterate(MessageHeaders headers,
                                                        String name)

    - #### parse

          public static HeaderElement[] parse(Header header)

    - #### canResponseHaveBody

          public static boolean canResponseHaveBody(String method,
                                                    HttpResponse response)

      Since:
        5.0

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