Interface HTTPInterceptor

  • All Implemented Interfaces:

    
    public interface HTTPInterceptor
    
                        

    An interceptor for HTTP requests made by the player.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      Unit onRequest(InterceptableHTTPRequest request) Intercepts an HTTP request before opening the connection, optionally modifying the request.
      Unit onResponse(InterceptableHTTPResponse response) Intercepts an HTTP response before consuming the response body, optionally modifying the response.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • onRequest

         Unit onRequest(InterceptableHTTPRequest request)

        Intercepts an HTTP request before opening the connection, optionally modifying the request.

        After this method returns, the given request can no longer be modified.

        Parameters:
        request - The mutable HTTP request
      • onResponse

         Unit onResponse(InterceptableHTTPResponse response)

        Intercepts an HTTP response before consuming the response body, optionally modifying the response.

        After this method returns, the given response can no longer be modified.

        Parameters:
        response - The mutable HTTP response