tags:

views:

416

answers:

1

I want to integrate the RESTful-API in my Qt-Project.
I already read the example on this page, but this is only for receiving data from a RESTful-interface, not for sending new data to the server. In Java, I can use RESTlet for example, is there any possibility to use something like that for Qt, too?
Or is there even a simple way to send data from Qt to RESTful, for example when I create a XML before?

+1  A: 

Since REST is just normal URL access, there's no reason you can't use the Qt HttpClient interfaces to talk to you backend Java REST interface. You just have to make a determination to use XML or JSON - both have very capable libraries available, and both are just text interfaces.

Odd you ask, I'm in the middle of doing this very thing myself today - I'm implementing a JSON based REST interface in Java, and I'll wire up the plumbing to my Qt app shortly.

I'll make an effort to update this answer as I progress.

Chris Kaminski
You likely want to use QNetworkAccessManager, the other stuff is deprecated :)
leinir