Class WrappedResponseDto<T>
- java.lang.Object
-
- org.evomaster.client.java.controller.api.dto.WrappedResponseDto<T>
-
public class WrappedResponseDto<T> extends Object
In REST, when we have an error, at most we would see a HTTP status code. But it can be very useful to get an actual description of the error. So, it is a common practice to have "Wrapped Responses", which can contain the error message (if any) Created by arcuri82 on 05-Nov-18.
-
-
Constructor Summary
Constructors Constructor Description WrappedResponseDto()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <K> WrappedResponseDto<K>
withData(K data)
static WrappedResponseDto<?>
withError(String error)
static WrappedResponseDto<?>
withNoData()
-
-
-
Method Detail
-
withData
public static <K> WrappedResponseDto<K> withData(K data)
-
withNoData
public static WrappedResponseDto<?> withNoData()
-
withError
public static WrappedResponseDto<?> withError(String error)
-
-