org.webpieces.webserver.test.ResponseExtract Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http-webserver-test Show documentation
Show all versions of http-webserver-test Show documentation
The full webpieces server AS A library
package org.webpieces.webserver.test;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import org.webpieces.httpclient11.api.HttpFullResponse;
public class ResponseExtract {
public static ResponseWrapper waitResponseAndWrap(CompletableFuture respFuture) {
try {
HttpFullResponse resp = respFuture.get(2, TimeUnit.SECONDS);
return new ResponseWrapper(resp);
} catch (Throwable e) {
throw new RuntimeException(e);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy