Is HTTP PUT supported in J2ME?

I just noticed a strange thing in the MIDP 2.0 API: the apidocs of the HttpConnection class make explicit references to the GET, POST and HEAD methods, but no other methods. Does this mean that they are not supported?

http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/io/HttpConnection.html

I also tried checking the MIDP 2.0 specification, but could not find any serious facts about it.

I can try some phones, but I can not try all of them. Does anyone know what HTTP methods are needed to support phones that implement the MIDP 2.0 specification? Or any experience finding phones that support / do not support, for example. HTTP PUT?

If PUT is not supported, are there any (portable) workarounds to implement it? Embed HTTP over SocketConnection?

+4
source share
3 answers

Technical support is not technically supported. I'm sure there are wrapper classes, but I'm sure they presented their own set of errors and work around.

Writing a simple wrapper is not difficult, writing a decent useful mistake that can make it harder.

+3
source

It may be difficult for you to execute it on top of SocketConnection, since many (most?) Implementations will not allow you to connect to port 80 or 8080 using SocketConnection if you do not trust / are not signed.

0
source

To the right, HttpConnection is limited to these verbs. I do not think it is possible to fix it, to use any other method. You will want to use Apache HttpClient . Among many other features

Full implementation of all HTTP protocol methods (GET, POST, PUT, DELETE, HEAD, OPTIONS and TRACE) in extensible OO.

-3
source

All Articles