Class BasicAuthIntercept

All Implemented Interfaces:

public class BasicAuthIntercept extends Object implements RequestIntercept
Adds Basic Authorization header to requests.
  • Constructor Details

    • BasicAuthIntercept

      public BasicAuthIntercept(String username, String password)
      Construct with the username and password.
  • Method Details

    • encode

      public static String encode(String username, String password)
      Return Base64 encoding of username:password
    • beforeRequest

      public void beforeRequest(HttpClientRequest request)
      Description copied from interface: RequestIntercept
      Before the request has been made.

      Typically we can add headers or modify the request prior to it being sent.

      Specified by:
      beforeRequest in interface RequestIntercept