Package io.varhttp.test
Class VarClientHttp
java.lang.Object
io.varhttp.test.VarClientHttp
- All Implemented Interfaces:
- VarClient
- 
Constructor SummaryConstructors
- 
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 clientwithServerUrl(String serverUrl) 
- 
Constructor Details- 
VarClientHttp
 
- 
- 
Method Details- 
withBasePath- Specified by:
- withBasePathin interface- VarClient
 
- 
withServerUrl
- 
withBasicAuthDescription copied from interface:VarClientSet basic auth on the client.- Specified by:
- withBasicAuthin interface- VarClient
- Parameters:
- username- username to use
- password- password to use
- clearCookies- if true, also clears any stored cookies
- Returns:
- this for chaining
 
- 
withBasicAuthDescription copied from interface:VarClientSet basic auth on the client.This also clears any stored cookies. - Specified by:
- withBasicAuthin interface- VarClient
- Parameters:
- username- username to use
- password- password to use
- Returns:
- this for chaining
 
- 
clearBasicAuthDescription copied from interface:VarClientClear basic auth from the client.This also removes any stored cookies. - Specified by:
- clearBasicAuthin interface- VarClient
- Returns:
- this for chaining
 
- 
clearCookiesDescription copied from interface:VarClientClear 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:
- clearCookiesin interface- VarClient
- Returns:
- this for chaining
 
- 
withCookiesDescription copied from interface:VarClientAdd cookies to the client- Specified by:
- withCookiesin interface- VarClient
- Parameters:
- cookie- cookies to add
- Returns:
- this for chaining
 
- 
getCookies- Specified by:
- getCookiesin interface- VarClient
- Returns:
- an unmodifiable list of cookies currently stored in the client
 
- 
post
- 
put
- 
get
- 
delete
- 
head
 
-