Package javax.microedition.io

Examples of javax.microedition.io.HttpConnection


  // Get leaderboard (types are viewed, voted, or commented
  Photos leaderboard(String type) {
   
    String urlToRequest       = "http://tweetphotoapi.com/api/tpapi.svc/leaderboard/uploadedtoday/" + type + ";deviceside=true";
    try {
      HttpConnection httpConn = HttpUtils.makeHttpConnection(urlToRequest, new HttpHeaders(), null, getCoverageBasedConnectionType(), "GET", this, false);             
      m_httpStatus = httpConn.getResponseCode();
    
      if (m_httpStatus != 200) {
               System.out.println("Error: " + m_httpStatus);
      } else {
        InputStream content = httpConn.openInputStream();
        String xml = convertStreamToString(content);
        DomPhotosParser photoParser = new DomPhotosParser();
        photoParser.m_Xml = xml;
        Photos photos = photoParser.parse();
        content.close();
View Full Code Here

TOP

Related Classes of javax.microedition.io.HttpConnection

Copyright © 2018 www.massapicom. 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.