I think several things are being mixed up here:
- If you want to set a query string with GET you should
specify it in the URL . For example:
HttpConnection c = (HttpConnection)Connector.open("http://host.com?a=1&b=2");
- To use the connection's ouput stream the request type has to be set to POST.
OutputStream os = c.openOutputStream();
- setRequestProperty() methods sets information in the HTTP protocol request header - this is not very good to pass data parameters and may
be misunderstood by the HTTP server.
Also, depending on which method you use the interface at the other end is different.