08-31-2010 12:48 PM - edited 08-31-2010 12:49 PM
I've writing a BlackBerry app reading HTTP files from remote server.
If I type http://beginningblackberry.appspot.com/ in the text box, the app would connect to Internet and read HTML file of the address and produces the following output:
<body><img src="img/apress_logo.png" /><br />
<form action="/" method="POST"><br />
<input type="text" name="content"></input>
<input type="submit" value="Go!"/>
it works fine with the simulator but when I install the app to a real device,
the app produces the error when it tries to read HTML file from remote server:
"Request failed. Reason: Unexpected response code: 302"
I've googled and found that this error is talking about redirection, but the link http://beginningblackberry.appspot.com/ is still accessible, it does not redirect user to any where else.
Please help me fix the problem!
08-31-2010 01:00 PM
There could be a redirect from an intervening gateway.
I recommend that you review the header information that is returned with this request to see what it is telling you to do.
What connection method are you using with this request?
08-31-2010 01:25 PM
Which connection medium you are trying to connect to your device like BES, BIS, WiFi or WAP ? Based on these connection medium, are you appending proper parameters at the end of URL?
08-31-2010 01:59 PM
I've just found this link
Connecting your BlackBerry - http and socket connections to the world
and am reading it. Hopefully it will show me something, thanks all of you for your help.