Package com.castlabs.android.network
Class NetworkMessage<HeaderValueType>
java.lang.Object
com.castlabs.android.network.NetworkMessage<HeaderValueType>
- Type Parameters:
HeaderValueType- The type of the header values
Base class for network requests and responses
-
Method Summary
-
Method Details
-
getUri
Get the request URI.- Returns:
- The request URI. Query parameters are not applied yet
-
getData
@Nullable public byte[] getData()Get the payload that will be sent with the request.- Returns:
- Optional request body bytes
-
setData
public void setData(@Nullable byte[] data) Set the payload to send with the request.- Parameters:
data- Request body bytes ornullwhen no payload should be sent
-
getTag
Get the tag that can be used to correlate responses.- Returns:
- Marker object associated with the request
-