Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Posts: 70
Registered: ‎09-17-2008
My Device: BlackBerry Bold 9000
My Carrier: Rogers

How to create HTTP PUT Request on BlackBerry

[ Edited ]

To give some background:

I'm building a BlackBerry frontend to talk to a backend web service built to support only PUT requests for a lot of important resources instead of POST requests. This backend worked fine for iOS but I can't seem to create a PUT request on the BlackBerry.



Looking through the BlackBerry API, I've been able to create GET/POST requests with the following code:

HttpConnection conn = (HttpConnection) Connector.open(URL);  




It seems that the HttpConnection class should support a PUT command as seen in the API here. I've tried manually setting the literal: conn.setRequestMethod("PUT");  but I keep getting a 400 error from the server. 


Does anyone know how to properly create a PUT request for the BlackBerry? My search throughout the web hasn't brought back any usable solutions so far. =( Thanks!