Package io.varhttp.test
Class VarClientServerless
java.lang.Object
io.varhttp.test.VarClientServerless
- All Implemented Interfaces:
VarClient
- Direct Known Subclasses:
SpaceAwareVarClient
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClear basic auth from the client.Clear all cookies from the clientList<jakarta.servlet.http.Cookie>
withBasePath
(String basePath) withBasicAuth
(String username, String password) Set basic auth on the client.withBasicAuth
(String username, String password, boolean clearCookies) Set basic auth on the client.withCookies
(jakarta.servlet.http.Cookie... cookie) Add cookies to the client
-
Constructor Details
-
VarClientServerless
-
-
Method Details
-
withBasePath
- Specified by:
withBasePath
in interfaceVarClient
-
withBasicAuth
Description copied from interface:VarClient
Set basic auth on the client.- Specified by:
withBasicAuth
in interfaceVarClient
- Parameters:
username
- username to usepassword
- password to useclearCookies
- if true, also clears any stored cookies- Returns:
- this for chaining
-
withBasicAuth
Description copied from interface:VarClient
Set basic auth on the client.This also clears any stored cookies.
- Specified by:
withBasicAuth
in interfaceVarClient
- Parameters:
username
- username to usepassword
- password to use- Returns:
- this for chaining
-
clearBasicAuth
Description copied from interface:VarClient
Clear basic auth from the client.This also removes any stored cookies.
- Specified by:
clearBasicAuth
in interfaceVarClient
- Returns:
- this for chaining
-
clearCookies
Description copied from interface:VarClient
Clear all cookies from the clientIs also called when setting or clearing basic auth with
VarClient.withBasicAuth(String, String)
orVarClient.clearBasicAuth()
to test a case where you login, then clear the auth and continue by using the cookie- Specified by:
clearCookies
in interfaceVarClient
- Returns:
- this for chaining
-
getCookies
- Specified by:
getCookies
in interfaceVarClient
- Returns:
- an unmodifiable list of cookies currently stored in the client
-
withCookies
Description copied from interface:VarClient
Add cookies to the client- Specified by:
withCookies
in interfaceVarClient
- Parameters:
cookie
- cookies to add- Returns:
- this for chaining
-
post
-
put
-
get
-
delete
-
head
-