Skip to content

Instantly share code, notes, and snippets.

@gnufied
Forked from anonymous/connection stuff for bb
Created September 22, 2009 19:09
Show Gist options
  • Save gnufied/191330 to your computer and use it in GitHub Desktop.
Save gnufied/191330 to your computer and use it in GitHub Desktop.
c = (HttpConnection)Connector.open(url, Connector.READ_WRITE, false);
c.setRequestMethod(HttpConnection.POST);
c.setRequestProperty("Content-Language", "en-US");
c.setRequestProperty( "User-Agent", "Mozilla/4.0");
c.setRequestProperty( "Content-Type", "application/x-www-form-urlencoded");
c.setRequestProperty( "Content-Length", encodedData.length() );
os = c.openOutputStream();
String rStr = this.req.toString();
os.write(("mobile_request=" +rStr).getBytes());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment