Class ResponseExtensions
- java.lang.Object
-
- dev.aherscu.qa.testing.utils.rest.ResponseExtensions
-
public final class ResponseExtensions extends Object
Fixes the JAX RS API a bit...- Author:
- aherscu
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static jakarta.ws.rs.core.Response
closeThis(jakarta.ws.rs.core.Response thisResponse)
Closes this response and returns it; enables fluent coding style.
-
-
-
Method Detail
-
closeThis
public static jakarta.ws.rs.core.Response closeThis(jakarta.ws.rs.core.Response thisResponse)
Closes this response and returns it; enables fluent coding style.Assuming that you have the Lombok library in your classpath, then applying
@ExtensionMethod({ ResponseExtensions.class })
on your class will allow you to usetarget.request().get().closeThis().getCookies()...
, wheretarget
is aWebTarget
.- Parameters:
thisResponse
- this response- Returns:
- the closed response
- See Also:
Response.close()
-
-