Package io.varhttp.test
Interface VarClient
- All Known Implementing Classes:
- SpaceAwareVarClient,- VarClientHttp,- VarClientServerless
public interface VarClient
- 
Method SummaryModifier 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
- 
Method Details- 
withBasePath
- 
withBasicAuthSet basic auth on the client.This also clears any stored cookies. - Parameters:
- username- username to use
- password- password to use
- Returns:
- this for chaining
 
- 
withBasicAuthSet basic auth on the client.- Parameters:
- username- username to use
- password- password to use
- clearCookies- if true, also clears any stored cookies
- Returns:
- this for chaining
 
- 
clearBasicAuthVarClient clearBasicAuth()Clear basic auth from the client.This also removes any stored cookies. - Returns:
- this for chaining
 
- 
clearCookiesVarClient clearCookies()Clear all cookies from the clientIs also called when setting or clearing basic auth with withBasicAuth(String, String)orclearBasicAuth()to test a case where you login, then clear the auth and continue by using the cookie- Returns:
- this for chaining
 
- 
withCookiesAdd cookies to the client- Parameters:
- cookie- cookies to add
- Returns:
- this for chaining
 
- 
getCookiesList<jakarta.servlet.http.Cookie> getCookies()- Returns:
- an unmodifiable list of cookies currently stored in the client
 
- 
post
- 
put
- 
get
- 
delete
- 
head
 
-