Package io.karatelabs.http
Class BasicAuthHandler
java.lang.Object
io.karatelabs.http.BasicAuthHandler
- All Implemented Interfaces:
AuthHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidapply(HttpRequestBuilder builder) getType()toCurlArgument(String platform) Returns the curl command argument for this auth handler, or null to use the default behavior (including the Authorization header).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.karatelabs.http.AuthHandler
toCurlPreview
-
Constructor Details
-
BasicAuthHandler
-
-
Method Details
-
apply
- Specified by:
applyin interfaceAuthHandler
-
getType
- Specified by:
getTypein interfaceAuthHandler
-
toCurlArgument
Description copied from interface:AuthHandlerReturns the curl command argument for this auth handler, or null to use the default behavior (including the Authorization header). For example, BasicAuthHandler can return "-u username:password"- Specified by:
toCurlArgumentin interfaceAuthHandler- Parameters:
platform- "sh" for Unix/Linux/macOS, "cmd" for Windows CMD, "ps" for PowerShell
-
getUsername
-
getPassword
-