开发者

Making REST requests and parsing REST response in C++?

I'm currently working on a project written completely in C++ and running on ubuntu. My requirement is to make REST based calls to Amazon SimpleDB to store/retrieve data.

Even though i know C++, i'm not sure how to proceed. Need some insight from the community on 开发者_运维百科how to proceed.

Thanks,

Nitin


SimpleDB is XML over HTTP: if you want to roll it from scratch, use either neon or curl for the http library, and probably libxml2 for the XML parsing. One alternative is also http://www.28msec.com/open_source/libaws: that might work for you.


First, you need a networking library that understands http protocol. Then you make http request to the web service (with required data to store). I don't know what Amazon SimpleDB returns, assuming it's JSON, you need a JSON parser library. Parse that, and display or do something else as you need.


The sad truth is you'd probably be much happier if you did your project in something like Java, Python or C#.

If you absolutely need to use C++, I get the strong impression vjson would probably be your best bet:

http://code.google.com/p/vjson/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜