java.lang.Object
io.avaje.http.client.BasicAuthIntercept
- All Implemented Interfaces:
RequestIntercept
Adds Basic Authorization header to requests.
-
Constructor Summary
ConstructorDescriptionBasicAuthIntercept
(String username, String password) Construct with the username and password. -
Method Summary
Modifier and TypeMethodDescriptionvoid
beforeRequest
(HttpClientRequest request) Before the request has been made.static String
Return Base64 encoding of username:passwordMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.avaje.http.client.RequestIntercept
afterResponse
-
Constructor Details
-
BasicAuthIntercept
Construct with the username and password.
-
-
Method Details
-
encode
Return Base64 encoding of username:password -
beforeRequest
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 interfaceRequestIntercept
-