import java.io.IOException;
import java.util.Objects;
import java.util.concurrent.ExecutionException;
+import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.eclipse.jdt.annotation.NonNullByDefault;
try {
String dataToSend = gson.toJson(new SenecHomeResponse());
logger.trace("data to send: {}", dataToSend);
- response = request.method(HttpMethod.POST).content(new StringContentProvider(dataToSend)).send();
+ response = request.method(HttpMethod.POST).content(new StringContentProvider(dataToSend))
+ .timeout(15, TimeUnit.SECONDS).send();
if (response.getStatus() == HttpStatus.OK_200) {
String responseString = response.getContentAsString();
return Objects.requireNonNull(gson.fromJson(responseString, SenecHomeResponse.class));