org.apache.jmeter.protocol.http.proxy

## Class HttpReplyHdr

- java.lang.Object
- - org.apache.jmeter.protocol.http.proxy.HttpReplyHdr

-     public final class HttpReplyHdr
      extends Object

  Utility class to generate HTTP responses of various types.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `formAccepted()` Indicates the document was accepted.
    `static String` | `formCreated()` Indicates a new file was created.
    `static String` | `formForbidden()` Client if forbidden to get the request service.
    `static String` | `formFound()` Never seen this used.
    `static String` | `formInternalError()` The server had a problem and could not fulfill the request.
    `static String` | `formMethod()` The requested method is not implemented by the server.
    `static String` | `formMoved()` Indicates a requested URL has moved to a new address or name.
    `static String` | `formNotAllowed()` Indicates the client is not allowed to access the object.
    `static String` | `formNotFound()` The requested object was not found.
    `static String` | `formNotImplemented()` Server does not do the requested feature.
    `static String` | `formNotImplemented(String reason)` Server does not do the requested feature.
    `static String` | `formNotModified()` Indicates remote copy of the requested object is current.
    `static String` | `formOk(String contentType, long contentLength)` Forms a http ok reply header
    `static String` | `formOverloaded()` Server is overloaded, client should try again latter.
    `static String` | `formPartial()` Indicates only a partial response was sent.
    `static String` | `formPaymentNeeded()` Payment is required for service.
    `static String` | `formServerNotFound()` Indicates the client's proxies could not locate a server.
    `static String` | `formTimeout()` Indicates the request took to long.
    `static String` | `formUnauthorized()` Client not authorized for the request.

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

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

- - ### Method Detail

    - #### formOk

          public static String formOk(String contentType,
                                      long contentLength)

      Forms a http ok reply header
      Parameters:
        `contentType` - the mime-type of the content
        `contentLength` - the length of the content
      Returns:
        a string with the header in it

    - #### formCreated

          public static String formCreated()

      Indicates a new file was created.
      Returns:
        The header in a string;

    - #### formAccepted

          public static String formAccepted()

      Indicates the document was accepted.
      Returns:
        The header in a string;

    - #### formPartial

          public static String formPartial()

      Indicates only a partial response was sent.
      Returns:
        The header in a string;

    - #### formMoved

          public static String formMoved()

      Indicates a requested URL has moved to a new address or name.
      Returns:
        The header in a string;

    - #### formFound

          public static String formFound()

      Never seen this used.
      Returns:
        The header in a string;

    - #### formMethod

          public static String formMethod()

      The requested method is not implemented by the server.
      Returns:
        The header in a string;

    - #### formNotModified

          public static String formNotModified()

      Indicates remote copy of the requested object is current.
      Returns:
        The header in a string;

    - #### formUnauthorized

          public static String formUnauthorized()

      Client not authorized for the request.
      Returns:
        The header in a string;

    - #### formPaymentNeeded

          public static String formPaymentNeeded()

      Payment is required for service.
      Returns:
        The header in a string;

    - #### formForbidden

          public static String formForbidden()

      Client if forbidden to get the request service.
      Returns:
        The header in a string;

    - #### formNotFound

          public static String formNotFound()

      The requested object was not found.
      Returns:
        The header in a string;

    - #### formInternalError

          public static String formInternalError()

      The server had a problem and could not fulfill the request.
      Returns:
        The header in a string;

    - #### formNotImplemented

          public static String formNotImplemented()

      Server does not do the requested feature.
      Returns:
        The header in a string;

    - #### formNotImplemented

          public static String formNotImplemented(String reason)

      Server does not do the requested feature.
      Parameters:
        `reason` - detailed information for causing the failure
      Returns:
        The header in a string;

    - #### formOverloaded

          public static String formOverloaded()

      Server is overloaded, client should try again latter.
      Returns:
        The header in a string;

    - #### formTimeout

          public static String formTimeout()

      Indicates the request took to long.
      Returns:
        The header in a string;

    - #### formServerNotFound

          public static String formServerNotFound()

      Indicates the client's proxies could not locate a server.
      Returns:
        The header in a string;

    - #### formNotAllowed

          public static String formNotAllowed()

      Indicates the client is not allowed to access the object.
      Returns:
        The header in a string;

Copyright © 1998-2022 Apache Software Foundation. All Rights Reserved.