Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void handleAuthPage(String localUrl) throws IOException {
- HttpGet get = new HttpGet("https://auth.salesgenie.com" + localUrl);
- appendFakeHeaders(get);
- CloseableHttpResponse authResponse = client.execute(get);
- Document document = Jsoup.parse(HttpClientUtil.textual(authResponse));
- String wa = document.select("input[name=wa]").attr("value");
- String wresult = document.select("input[name=wresult]").attr("value");
- String wctx = document.select("input[name=wctx]").attr("value");
- HttpPost post = new HttpPost("https://app.salesgenie.com/Home/Home");
- List<NameValuePair> params = new ArrayList<NameValuePair>();
- params.add(new BasicNameValuePair("wa", wa));
- params.add(new BasicNameValuePair("wresult", wresult));
- params.add(new BasicNameValuePair("wctx", wctx));
- post.setEntity(new UrlEncodedFormEntity(params));
- appendFakeHeaders(post);
- client.execute(post);
Advertisement
Add Comment
Please, Sign In to add comment