• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

9. Application Development > 94. Create HTTP Connections

Create HTTP Connections

Create simple HTTP requests from a BlackBerry application.

The most powerful feature of programming BlackBerry applications is having the ability to make your applications perform wireless network connections to servers. The most common network connection type is HTTP allowing applications to connect to web servers anywhere on the Internet.

Create HTTP GET Requests

After importing the java.io.* and javax.microedition.io.* packages, here’s is all you need in J2ME to create an HTTP connection:

	HttpConnection c = (HttpConnection)Connector.open("http://www.yahoo.com");

This will perform an HTTP connection to the Yahoo! web server. To read the response from the server, the first thing you must do is read the HTTP response code:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint