z2k
z2k

Reputation: 10380

How to make HTTP POST/GET in a c++ metro app?

I have a some web services that my app needs to communicate with by sending json with REST over HTTP POST/GET. The only way I can see to do this is with the iXMLHTTPRequest2 framework but geeze oh man is it uglier than I want to deal with.

Is this the only option I have to look at with c++?

Would this be easier with c#? I know most of the things are the same across the languages, but if c# has a better way to do this, I'd be willing to make the jump.

Upvotes: 0

Views: 464

Answers (2)

Andy Rich
Andy Rich

Reputation: 1962

You should also look into Project Casablanca - it's a fully native C++ library that also is adapted for use with Metro apps (I believe it wraps IXHR2). I've been using it to perform http REST calls and to parse JSON very successfully.

Upvotes: 1

JP Alioto
JP Alioto

Reputation: 45117

That's the interface you have to use in C++. It is more difficult than in C#. Given that, there is a good sample that will make using that interface a bit more bearable.

Upvotes: 0

Related Questions