use of org.openclinica.ns.response.v31.Response in project sonarqube by SonarSource.
the class CeHttpServerTest method action_is_matched_on_URL_with_parameters.
@Test
public void action_is_matched_on_URL_with_parameters() throws IOException {
Response response = call(underTest.getUrl() + "/pompom?toto=2");
assertIsPomPomResponse(response);
}
use of org.openclinica.ns.response.v31.Response in project sonarqube by SonarSource.
the class CeHttpServerTest method action_is_matched_on_exact_URL.
@Test
public void action_is_matched_on_exact_URL() throws IOException {
Response response = call(underTest.getUrl() + "/pompom");
assertIsPomPomResponse(response);
}
use of org.openclinica.ns.response.v31.Response in project sonarqube by SonarSource.
the class CeHttpServerTest method start_starts_http_server_and_publishes_URL_in_IPC.
@Test
public void start_starts_http_server_and_publishes_URL_in_IPC() throws Exception {
Response response = call(underTest.getUrl() + "/pompom?toto=2");
assertIsPomPomResponse(response);
}
use of org.openclinica.ns.response.v31.Response in project MVCHelper by LuckyJayce.
the class BooksOkHttp_SyncDataSource method loadBooks.
private List<Book> loadBooks(final int page) throws Exception {
GetMethod method = new GetMethod("https://www.baidu.com");
method.addHeader("a", "aaaaa");
method.addParam("api_key", "75ee6c644cad38dc8e53d3598c8e6b6c");
List<Book> data = method.executeSync(new ResponseParser<List<Book>>() {
@Override
public List<Book> parse(Response response) throws Exception {
Thread.sleep(1000);
List<Book> books = new ArrayList<Book>();
for (int i = 0; i < 15; i++) {
books.add(new Book("page" + page + " Java编程思想 " + i, 108.00d));
}
mPage = page;
return books;
}
});
return data;
}
use of org.openclinica.ns.response.v31.Response in project feign by OpenFeign.
the class OkHttpClient method execute.
@Override
public feign.Response execute(feign.Request input, feign.Request.Options options) throws IOException {
okhttp3.OkHttpClient requestScoped;
if (delegate.connectTimeoutMillis() != options.connectTimeoutMillis() || delegate.readTimeoutMillis() != options.readTimeoutMillis()) {
requestScoped = delegate.newBuilder().connectTimeout(options.connectTimeoutMillis(), TimeUnit.MILLISECONDS).readTimeout(options.readTimeoutMillis(), TimeUnit.MILLISECONDS).build();
} else {
requestScoped = delegate;
}
Request request = toOkHttpRequest(input);
Response response = requestScoped.newCall(request).execute();
return toFeignResponse(response).toBuilder().request(input).build();
}
Aggregations