|
try {
var pvars = new Dictionary<string, string>
{
{"Content-Type", "application/json"},
{"X-Gizwits-Application-Id", "c5cd9be8f7d5462fbaff70956bfe0662"}
};
Curl.GlobalInit((int)CURLinitFlag.CURL_GLOBAL_ALL);
Easy easy = new Easy();
Easy.WriteFunction wf = new Easy.WriteFunction(OnWriteData);
easy.SetOpt(CURLoption.CURLOPT_URL, "http://api.gizwits.com/app/users");
easy.SetOpt(CURLoption.CURLOPT_HTTPHEADER, pvars);
easy.SetOpt(CURLoption.CURLOPT_HTTPPOST, true);
easy.SetOpt(CURLoption.CURLOPT_WRITEFUNCTION, wf);
easy.Perform();
easy.Cleanup();
Curl.GlobalCleanup();
} catch(Exception ex) {
Console.WriteLine(ex);
}
Console.ReadKey();
|
|