GET and POST to FTS index in C++

How to send a query to FTS index and get response using C++ in linux ?(Not in terminal but inside .cpp file )
Please give a sample code.