* @return the asset ID and name
*/
public AssetResponse addAsset(final File file) throws SodaError, InterruptedException
{
SodaRequest requester = new SodaRequest<File>(null, file)
{
public ClientResponse issueRequest() throws LongRunningQueryException, SodaError
{
return httpLowLevel.postFileRaw(assetUri, MediaType.TEXT_PLAIN_TYPE, MediaType.TEXT_PLAIN_TYPE, payload);
}
};
try {
final ClientResponse response = requester.issueRequest();
return mapper.readValue(response.getEntity(InputStream.class), AssetResponse.class);
//return response.getEntity(AssetResponse.class);
} catch (LongRunningQueryException e) {
return getHttpLowLevel().getAsyncResults(e.location, e.timeToRetry, getHttpLowLevel().getMaxRetries(), AssetResponse.class, requester);
} catch (JsonMappingException e) {