Hi Shai
Yes, I saw the above links but terse is not worked for http post(because of
the cast Respose<Map> to Map<String, Object>)
And I got the source you posted as well:

ConnectionRequest post = new ConnectionRequest(){
    @Override
    protected void buildRequestBody(OutputStream os) throws IOException {
        os.write(json.toString().getBytes("UTF-8"));
    }

    @Override
    protected void readResponse(InputStream input) throws IOException {
       // parse response data
    }};
post.setUrl("http://localhost:8093/halimatbank/cbs/staff";);
post.setPost(true);
post.setContentType("application/json");

I tried above code but the buildRequestBody() is not invoked and never
worked.
Seems that I missed one configuration.

Would you like to hint me what I'm missing?

Regards

On Fri, Nov 3, 2017 at 10:35 PM, Shai Almog <[email protected]> wrote:

> There is a cn1lib that includes JSONObject we have our own JSON parser.
> There is some discussion of using a webservice in this video
> https://www.codenameone.com/how-do-i-use-http-sockets-
> webservices-websockets.html
>
> As well as here:
> https://www.codenameone.com/blog/terse-rest-api.html
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "CodenameOne Discussions" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/
> topic/codenameone-discussions/9O8cwEkgfrQ/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> Visit this group at https://groups.google.com/
> group/codenameone-discussions.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/codenameone-discussions/7ebdf340-e18f-4b41-b280-
> a099a27a7144%40googlegroups.com
> <https://groups.google.com/d/msgid/codenameone-discussions/7ebdf340-e18f-4b41-b280-a099a27a7144%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/CA%2BHn3q1tnXNnHqv3f88LgPFA_YeENG%2Bei8JMZrmviREN2fcpFw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to