Search code examples
restjava-memidpcldc

Is there a good HttpClient library for J2ME/MIDP?


I want to call some RESTful web services from a J2ME client running on a MIDP enabled mobile device. I read the MIDP api for HTTPConnections and thought this is just crying out for a simple wrapper to hide all those unpleasant byte arrays and such like. Before I write my own I wondered whether there was a good open source library already available.

-FE-


Solution

  • You might want to check out this little gem, Mobile Ajax for Java ME:

    https://meapplicationdevelopers.java.net/mobileajax.html

    One part is (from the site):

    Asynchronous I/O for Java ME

    This library provides the equivalent of XmlHttpRequest for Java ME with some additional functionality useful for invoking RESTful web services.

    It is layered on top of the com.sun.me.web.path library. Features include -

    * Asynchronous versions of HTTP Get and Post
    * HTTP Basic Authentication
    * Multipart MIME (sender only)
    * Progress listeners