Click here to Skip to main content
15,888,351 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all, I have a music server on my Lan at this location

C++
http://myipaddress:9000/jsonrpc.js


and I want to post a request in the format

C++
{\"id\":1,\"method\":\"slim.request\",\"params\":[null,[\"serverstatus\"]]}


As this program needs to run on an Android device I want to do it in C++ ( I don't want to do it in Java ) Any ideas how I can achieve this without using external libraries ?

What I have tried:

I've tried creating a socket and writing raw bytes to it but unsurprisingly I get a bad request reponse
Posted
Comments
rajeev.ra 11-Feb-16 7:59am    
You can try using Casablanca.
pkfox 11-Feb-16 8:21am    
Isn't Casablanca Microsoft ? I need a bare bones C++ example just to get me started I haven't done much web stuff so I want to know the nuts and bolts of how to talk to a server - thanks

1 solution

There is a bit more to it than just sending those bytes, see C++ json - Google Search[^].
 
Share this answer
 
Comments
Arthur V. Ratz 20-Mar-16 11:38am    
5.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900