BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-21-2004, 12:01 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2004
Posts: 24
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default setRequestProperty Content-Length don't work

Please Login to Remove!

Hi,

in my code set connection content-length
by

c.setRequestMethod(HttpConnection.POST);
c.setRequestProperty("User-Agent", "BlackBerry/3.2.1");
c.setRequestProperty("Content-Language", "en-US");
c.setRequestProperty("Content-Length", String.valueOf(length));

and write in outputStream
by

byte[] requestArray = request.getBytes();
for (int i = 0, l=requestArray.length; i < l; i++) {
os.write(requestArray[i]);
}

but if requestArray is too large, write operation fails!

Why?
c.setRequestProperty("Content-Length"... works in 7230 Handheld?

Thanks for any suggestion.
fabius
Offline  
Old 09-21-2004, 08:17 PM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Sep 2004
Model: 8700r
Carrier: Rogers
Posts: 221
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

If it works on the 7230 it should work? Are you trying this on a real device? What model is it not working on?
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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

GY-NEO6MV2 Flight Controller NEO-6M APM 2.5 GPS Module For Arduino EEPROM TE518
$11.15
GY-NEO6MV2 Flight Controller NEO-6M APM 2.5 GPS Module For Arduino EEPROM TE518 pictureCH341A 24 25 Series EEPROM Flash BIOS USB Programmer
$6.88
CH341A 24 25 Series EEPROM Flash BIOS USB Programmer pictureTL866A USB Minipro Programmer 10x Adapter EEPROM FLASH 8051 AVR MCU GAL PIC SPI
$74.95
TL866A USB Minipro Programmer 10x Adapter EEPROM FLASH 8051 AVR MCU GAL PIC SPI picture93LC46BT-I/SN 1K Serial EEPROM 2.5V x 10pcs
$2.0
93LC46BT-I/SN 1K Serial EEPROM 2.5V x 10pcs picture5PCS AT24C256C-SSHL-T SOP-8 AT24C256 2ECL AT24C256BN-SH-T 2-Wire Serial EEPROM C
$1.75
5PCS AT24C256C-SSHL-T SOP-8 AT24C256 2ECL AT24C256BN-SH-T 2-Wire Serial EEPROM C picture






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