Search code examples
javajava-memidphttpconnection

Is HTTP PUT supported in J2ME?


I just noticed a strange thing in MIDP 2.0 API: The HttpConnection class apidocs make explicit references to methods GET, POST and HEAD, 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 spec, but couldn't find any hard facts about this.

I can give this a try on some phone(s), but can't try them all. Does anyone know which HTTP methods are required to be supported by phones implementing the MIDP 2.0 spec? Or any experience in finding phones that support/don't support e.g. HTTP PUT?

If PUT is not supported, are there any (portable) workarounds for implementing it? Implement HTTP on top of SocketConnection?


Solution

  • It is not technically supported by the spec. I am sure there are wrapper classes but I am sure they would introduce their own set of bugs and work arounds.

    Writing a simple wrapper isn't hard, writing a decent usable bug free one is way mmore complicated