Is there a good HttpClient library for J2ME/MIDP?
Asked Answered
S

4

6

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-

Sheenasheeny answered 11/11, 2008 at 14:30 Comment(0)
A
5

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
Andersonandert answered 13/11, 2008 at 14:24 Comment(1)
The link needs fixing as it has an extra http at the beginningRoberts
M
1

LWUIT 1.5 now includes classes for accessing REST, using OAuth2, JSON, etc.

Magniloquent answered 18/3, 2013 at 8:50 Comment(0)
R
0

I don't know of any such library, but found some succinct examples of accessing various RESTful web services

Roberts answered 12/11, 2008 at 17:23 Comment(0)
Q
0

We ended up writing our own simple wrapper api for a variety of reasons not the least of which was the fact that the Sony Ericsson K750 that we were developing for had a weird bug (that SE refused to fix) where if you tried to get/use a connection when the device was off network, more than about 20 times, the internal connection pool would get hosed and never recover unless you restarted the app.

Quire answered 16/11, 2008 at 18:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.