BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 12-27-2008, 01:17 PM   #1
goenkamit
New Member
 
Join Date: May 2007
Model: 8700g
PIN: N/A
Carrier: Airtel
Posts: 1
Default HTTP Post Problem

Please Login to Remove!

Hi,

We are looking to send about 100 Kb of data using HTTP POST but get an exception - IOTimeOut Exception.

We split the data is packets of less than 1500 bytes and they go well. We can use this option but is not very feasible for us at this point of time.

Is there a limitation on HTTP Post in Blackberry. We see the problem when we run it on the device. It works well on the emulator.

Any suggestions/pointers to make the HTTP post work will be very helpful. We are trying on Pearl 8100.

Looking forward to suggestions.

Regards
Amit

Code snippet for headers:

c = (HttpConnection) Connector.open(strURL);
c.setRequestMethod(HttpConnection.POST);
c.setRequestProperty("If-Modified-Since",
"29 Oct 1999 19:43:31 GMT");
c.setRequestProperty("User-Agent",
"Profile/MIDP-2.0 Configuration/CLDC-1.0");
c.setRequestProperty("Content-Language", "en-US");
c.setRequestProperty(HttpProtocolConstants.HEADER_ CONTENT_LENGTH, String.valueOf(400));

c.setRequestProperty(HttpProtocolConstants.HEADER_ CONTENT_TYPE, HttpProtocolConstants.CONTENT_TYPE_APPLICATION_XML );
c.setRequestProperty(HttpProtocolConstants.HEADER_ CONNECTION, "Close");


if (buff != null) {
os = c.openOutputStream();

os.write(buff,0,400);
os.write('\r');
os.write('\n');

os.flush();

}

status = c.getResponseCode();
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


CH341A 24 25 Series EEPROM Flash BIOS USB Programmer Module + SOIC8 Test Clip picture

CH341A 24 25 Series EEPROM Flash BIOS USB Programmer Module + SOIC8 Test Clip

$5.88



EEPROM BIOS USB Programmer CH341A + SOP8 Clip + 1.8V Adapter + SOP8 Adapter picture

EEPROM BIOS USB Programmer CH341A + SOP8 Clip + 1.8V Adapter + SOP8 Adapter

$14.48



10PCS W27C512-45Z W27C512 DIP IC EEPROM 512KBIT 45NS Winbond EEPROMs USA picture

10PCS W27C512-45Z W27C512 DIP IC EEPROM 512KBIT 45NS Winbond EEPROMs USA

$17.98



10* DIP-28 Eeproms Programmable Flash Chip For SST27SF512-70-3C-PG SST 27SF512 picture

10* DIP-28 Eeproms Programmable Flash Chip For SST27SF512-70-3C-PG SST 27SF512

$28.31



10PCS W27C512-45Z W27C512 DIP IC EEPROM 512KBIT 45NS Winbond EEPROMs US picture

10PCS W27C512-45Z W27C512 DIP IC EEPROM 512KBIT 45NS Winbond EEPROMs US

$19.59



REVELPROG-IS SERIAL FLASH & EEPROM PROGRAMMER (1.8V - 5V + ISP, USB) picture

REVELPROG-IS SERIAL FLASH & EEPROM PROGRAMMER (1.8V - 5V + ISP, USB)

$139.00







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.