Success

public final class Success<T extends Object> extends Resource<T>

Holds the successfully requested API resource's data and HTTP response information.

Constructors

Link copied to clipboard
public Resource.Success<T> Resource.Success<T extends Any>(T data, Integer responseStatusCode, Map<String, List<String>> responseHeaders, String responseBody)

Functions

Link copied to clipboard
public T getData()
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
public final Resource<U> mapSuccess<U extends Any>(SuspendFunction1<Resource.Success<T>, Resource<U>> block)

Utility method to chain API resource requests by mapping the successful resource request to the resource returned by the block.

Properties

Link copied to clipboard
private final T data
Link copied to clipboard
private final String responseBody
Link copied to clipboard
Link copied to clipboard