List of usage examples for org.openqa.selenium.remote.http HttpMethod GET
HttpMethod GET
To view the source code for org.openqa.selenium.remote.http HttpMethod GET.
Click Source Link
From source file:com.mengge.MobileCommand.java
License:Apache License
/** * This methods forms GET commands.//from w w w. j av a2 s. c o m * * @param url is the command URL * @return an instance of {@link org.openqa.selenium.remote.CommandInfo} */ public static CommandInfo getC(String url) { return new CommandInfo(url, HttpMethod.GET); }
From source file:io.appium.java_client.AppiumDriver.java
License:Apache License
private static CommandInfo getC(String url) { return new CommandInfo(url, HttpMethod.GET); }
From source file:io.appium.java_client.MobileCommand.java
License:Apache License
static CommandInfo getC(String url) { return new CommandInfo(url, HttpMethod.GET); }
From source file:org.openqa.grid.web.servlet.NodeSessionsServlet.java
License:Apache License
private Map<String, Object> extractSessionInfo(RemoteProxy proxy) { try {/*ww w. ja v a2 s . c o m*/ URL url = proxy.getRemoteHost(); HttpRequest req = new HttpRequest(HttpMethod.GET, "/wd/hub/sessions"); Integer nodeStatusCheckTimeout = proxy.getConfig().nodeStatusCheckTimeout; HttpResponse rsp = proxy.getHttpClient(url, nodeStatusCheckTimeout, nodeStatusCheckTimeout) .execute(req); try (InputStream in = new ByteArrayInputStream(rsp.getContent()); Reader reader = new InputStreamReader(in, rsp.getContentEncoding()); JsonInput jsonReader = json.newInput(reader)) { return jsonReader.read(Json.MAP_TYPE); } catch (JsonException e) { // Nothing to do --- poorly formed payload. } } catch (IOException e) { throw new GridException(e.getMessage()); } return new TreeMap<>(); }