Package org.eclipse.ecf.internal.bulletinboard.commons.webapp

Examples of org.eclipse.ecf.internal.bulletinboard.commons.webapp.PostRequest.execute()


        new NameValuePair("redirect", ""),
        new NameValuePair("login", "Log in") };
    request.setParameters(params);

    try {
      request.execute();
      request.releaseConnection();
      Map<String, String> detectedCookies = PHPBBCookies
          .detectCookies(httpClient.getState().getCookies());
      if (detectedCookies.containsKey(PHPBBCookies.KEY_SESS_ID)) {
        // We have a session id
View Full Code Here


  public boolean logout() throws BBException {
    PostRequest request = new PostRequest(httpClient, url, "login.php");
    request.addParameter(new NameValuePair("logout", "true"));
    try {
      request.execute();
      request.releaseConnection();
      loggedInMemberId = null;
      return true;
    } catch (Exception e) {
      throw new BBException(e);
View Full Code Here

        // checkbox : disabled new NameValuePair("notify", "on"),
        new NameValuePair("post", "Submit") };
    request.addParameters(params);
    // We seem to always have to get the response body.
    try {
      request.execute();
      request.getResponseBodyAsString();
    } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

        // checkbox : disabled new NameValuePair("notify", "on"),
        new NameValuePair("post", "Submit") };
    request.addParameters(params);
    String resp = null;
    try {
      request.execute();
      resp = request.getResponseBodyAsString();
      String info = ((PHPBBParser) bb.getParser())
          .parseInformationMessage(resp);
      Matcher m = Pattern.compile(
          "<a href=\"viewtopic.php\\?p=([0-9]+)(?:.*?)\">").matcher(
 
View Full Code Here

        new NameValuePair("forceredirect", "0"),
        new NameValuePair("vb_login_md5password", ""),
        new NameValuePair("vb_login_md5password_utf", "") };
    request.setParameters(params);
    try {
      request.execute();
      request.releaseConnection();
      Map<String, String> detectedCookies = VBCookies
          .detectCookies(httpClient.getState().getCookies());
      if (detectedCookies.containsKey(VBCookies.KEY_SESS_ID)) {
        // We have a session id
View Full Code Here

  }

  public boolean logout() throws BBException {
    PostRequest request = new PostRequest(httpClient, url, "logout.php");
    try {
      request.execute();
      request.releaseConnection();
      loggedInMemberId = null;
      return true;
    } catch (Exception e) {
      throw new BBException(e);
View Full Code Here

        new NameValuePair("parseurl", "1"),
    // checkbox : disabled new NameValuePair("disablesmilies", "1"),
    };
    request.addParameters(params);
    try {
      request.execute();
      // TODO: do we have to do this?
      String resp = request.getResponseBodyAsString();
      Header newLocation = request.getMethod().getResponseHeader(
          "Location");
      if (newLocation == null) {
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.