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
  • Select an option

  • Save gnufied/191330 to your computer and use it in GitHub Desktop.

Select an option

Save gnufied/191330 to your computer and use it in GitHub Desktop.

Revisions

  1. gnufied revised this gist Sep 22, 2009. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions connection stuff for bb
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,9 @@
    c = (HttpConnection)Connector.open(url, Connector.READ_WRITE, false);
    c.setRequestMethod(HttpConnection.POST);
    c.setRequestProperty("Content-Language", "en-US");
    conn.setRequestProperty( "User-Agent", "Mozilla/4.0");
    conn.setRequestProperty( "Content-Type", "application/x-www-form-urlencoded");
    conn.setRequestProperty( "Content-Length", encodedData.length() );
    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();
  2. gnufied revised this gist Sep 22, 2009. 1 changed file with 4 additions and 0 deletions.
    4 changes: 4 additions & 0 deletions connection stuff for bb
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,10 @@
    c = (HttpConnection)Connector.open(url, Connector.READ_WRITE, false);
    c.setRequestMethod(HttpConnection.POST);
    c.setRequestProperty("Content-Language", "en-US");
    conn.setRequestProperty( "User-Agent", "Mozilla/4.0");
    conn.setRequestProperty( "Content-Type", "application/x-www-form-urlencoded");
    conn.setRequestProperty( "Content-Length", encodedData.length() );

    os = c.openOutputStream();
    String rStr = this.req.toString();
    os.write(("mobile_request=" +rStr).getBytes());
  3. @invalid-email-address Anonymous created this gist Sep 22, 2009.
    6 changes: 6 additions & 0 deletions connection stuff for bb
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    c = (HttpConnection)Connector.open(url, Connector.READ_WRITE, false);
    c.setRequestMethod(HttpConnection.POST);
    c.setRequestProperty("Content-Language", "en-US");
    os = c.openOutputStream();
    String rStr = this.req.toString();
    os.write(("mobile_request=" +rStr).getBytes());