Examples of postMethod()


Examples of de.marcusschiesser.dbpendler.server.utils.HTTPSession.postMethod()

  // "https://fahrkarten.bahn.de/mobile/st/li.post?lang=de"
  public HTTPSession login(String login, String pin) throws IOException, SAXException {
    HTTPSession session = new HTTPSession();
    session.getMethod(startURL);
    final String params = "login=" + login + "&pin=" + pin + "&button.login_p=Login";
    String response = session.postMethod(loginURL, params);
    InputStream inputStream = HTTPUtils.stringToStream(response);
    LoginValidationHandler handler = new LoginValidationHandler();
    reader.setContentHandler(handler);
    reader.parse(new InputSource(inputStream));
    if(!handler.isValid()) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.