org.apache.hc.client5.testing.classic

## Class EchoHandler

- java.lang.Object
- - org.apache.hc.client5.testing.classic.EchoHandler

- All Implemented Interfaces:
    HttpRequestHandler

      public class EchoHandler
      extends Object
      implements HttpRequestHandler

  A handler that echos the incoming request entity.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `EchoHandler()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `handle(ClassicHttpRequest request, ClassicHttpResponse response, HttpContext context)` Handles a request by echoing the incoming request entity.

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

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

- - ### Constructor Detail

    - #### EchoHandler

          public EchoHandler()

  - ### Method Detail

    - #### handle

          public void handle(ClassicHttpRequest request,
                             ClassicHttpResponse response,
                             HttpContext context)
                      throws HttpException,
                             IOException

      Handles a request by echoing the incoming request entity. If there is no request entity, an empty document is returned.
      Specified by:
        `handle` in interface `HttpRequestHandler`
      Parameters:
        `request` - the request
        `response` - the response
        `context` - the context
      Throws:
        `HttpException` - in case of a problem
        `IOException` - in case of an IO problem

Copyright © 1999–2021 The Apache Software Foundation. All rights reserved.