This test application uses an HTTP connection to request a web page. The request is issued with HTTP protocol GET or POST methods. If the HEAD method is used, the head properties are read from the request.
Preparing to Run the Demo
Before beginning, examine your settings as follows.
Right-click on Demos and select Properties.
Select the Running category.
Select Regular Execution.
Check Specify the Security Domain and select Maximum.
If you are using a proxy server, you must configure the emulator’s proxy server settings as described in Configuring the Web Browser and Proxy Settings. The HTTP version must be 1.1.
If you are running antivirus software, you might need to create a rule that allows this MIDlet to allow connections to and from a specific web site. See Troubleshooting.
Running the Demo
Launch the Http MIDlet. To test, choose the Menu soft key and choose Get, Post, or Head to test the selected URL.
Http Test returns the information it is able to obtain. If the information fills the screen use the down arrow to scroll to the end. The amount of information depends on the type of request and on the amount of META information the page provides. To provide body information or content, the page must declare CONTENT-LENGTH as described in RFC 2616.
Using Menu Options
Use the Menu soft key for the following actions.
Choose 2 to GET information from the selected page.
Choose 3 to obtain the POST information from the selected page.
Choose 4 to display the HEAD attributes for the page.
Choose 5 to bring up the current list of web pages. You can chose a new page or add your own page to the list. To specify a new URL, choose the Add soft button, then select the Menu soft button and choose OK. The screen displays http://. Type in the rest of the URL, making sure to end with a slash (/). For example http://www.internetnews.com/. Press the OK soft button. The Http Test screen shows your new URL and prompts for an action.