Package api.http

Examples of api.http.HttpRequest.send()


    }
    String data = PicasaAlbum.createAlbumXML(this.title, this.description, this.access, this.lastModified, this.canComment, this.position, this.location, this.cover, this.albumId);
    httpRequest.setData(data);
    httpRequest.setMethod(HttpRequest.METHOD_PUT);
    httpRequest.setContentType("application/atom+xml");
    String response = httpRequest.send();
  }

  /**
   * deleted the Picasa Album.
   *
 
View Full Code Here


      KeyValuePair pair = this.getPicasaWeb().getGoogleapi().toAuthHeader();
      httpRequest.addHeader(pair.key, pair.value);
    }
    httpRequest.setMethod(HttpRequest.METHOD_DELETE);
    httpRequest.setContentType("application/atom+xml");
    String response = httpRequest.send();
    this.albumId = null;
    this.title = null;
    this.description = null;
    this.access = null;
    this.lastModified = null;
View Full Code Here

    HttpRequest httpRequest = new HttpRequest(url);
    if (this.picasaWeb.getGoogleapi() != null){
      KeyValuePair pair = this.picasaWeb.getGoogleapi().toAuthHeader();
      httpRequest.addHeader(pair.key, pair.value);
    }
    String response = httpRequest.send();
    Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(response)));
    return new PicasaPhoto(this, document.getDocumentElement());
  }

  /**
 
View Full Code Here

    HttpRequest httpRequest = new HttpRequest(this.feedUrl);
    if (this.picasaWeb.getGoogleapi() != null){
      KeyValuePair pair = this.picasaWeb.getGoogleapi().toAuthHeader();
      httpRequest.addHeader(pair.key, pair.value);
    }
    String response = httpRequest.send();
    Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(response)));
    List<PicasaPhoto> picasaPhotos = new ArrayList<PicasaPhoto>();
    NodeList entries = document.getElementsByTagName("entry");
    for (int i = 0; i < entries.getLength(); i++){
      Element entry = (Element)entries.item(i);
View Full Code Here

    }
    String data = PicasaComment.createCommentXML(comment);
    httpRequest.setData(data);
    httpRequest.setMethod(HttpRequest.METHOD_POST);
    httpRequest.setContentType("application/atom+xml");
    String response = httpRequest.send();
    Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(response)));
    return new PicasaComment(this, document.getDocumentElement());
  }

  /**
 
View Full Code Here

    HttpRequest httpRequest = new HttpRequest(url);
    if (this.picasaAlbum.getPicasaWeb().getGoogleapi() != null){
      KeyValuePair pair = this.picasaAlbum.getPicasaWeb().getGoogleapi().toAuthHeader();
      httpRequest.addHeader(pair.key, pair.value);
    }
    String response = httpRequest.send();
    Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(response)));
    return new PicasaTag(this, document.getDocumentElement());
  }

  /**
 
View Full Code Here

    HttpRequest httpRequest = new HttpRequest(new URL(path));
    if (this.picasaAlbum.getPicasaWeb().getGoogleapi() != null){
      KeyValuePair pair = this.picasaAlbum.getPicasaWeb().getGoogleapi().toAuthHeader();
      httpRequest.addHeader(pair.key, pair.value);
    }
    String response = httpRequest.send();
    Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(response)));
    List<PicasaTag> picasaTags = new ArrayList<PicasaTag>();
    NodeList entries = document.getElementsByTagName("entry");
    for (int i = 0; i < entries.getLength(); i++){
      Element entry = (Element)entries.item(i);
View Full Code Here

    }
    String data = PicasaTag.createTagXML(tag);
    httpRequest.setData(data);
    httpRequest.setMethod(HttpRequest.METHOD_POST);
    httpRequest.setContentType("application/atom+xml");
    String response = httpRequest.send();
    Document document = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(response)));
    return new PicasaTag(this, document.getDocumentElement());
  }

  /**
 
View Full Code Here

      KeyValuePair pair = this.picasaPhoto.getPicasaAlbum().getPicasaWeb().getGoogleapi().toAuthHeader();
      httpRequest.addHeader(pair.key, pair.value);
    }
    httpRequest.setMethod(HttpRequest.METHOD_DELETE);
    httpRequest.setContentType("application/atom+xml");
    String response = httpRequest.send();
    this.comment = null;
    this.commentId = null;
    this.editUrl = null;
    this.lastModified = 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.