Slide 5.3: Network connection (cont.) Slide 5.5: Fetching a page using a StreamConnection Home |
GET
method: Information from a form using the GET
method is appended onto the end of the action URI being requested.
This is not a secure way to transmit form data since the form data is appended to a string of characters visible in your browser's “location” window, such as,
scriptname.cgi?somedata=example&homephone=123-1234
HEAD
method: The HEAD
method is used to ask only for information about a document, not for the document itself.
POST
method: This method transmits all form input information immediately after the requested URI.
The submitted data is not visible (it does not appear in the URL as with the get method).
User-Agent
(or browser ID) request header contains information about compatibility, the browser, and the platform name.
For example,
c.setRequestProperty( "User-Agent", "Profile/MIDP-1.0 Configuration/CLDC-1.0" );If there is a method that requires data to be sent or received from the server, there is a state transition from
Setup
to Connected
.
Examples of methods that cause the transition include:
openInputStream openOutputStream openDataInputStream openDataOutputStream |
getLength getType getDate getExpiration |
getURL getProtocol |
getHost getPort |