/*
* curl based wimi
* is it possible to a c version as simply as go's?
* go's net/http was inspired by curl - so let's use that
* yes - it is possible.
*/
#include <curl/curl.h>
#include <err.h>
int
main()
{
CURL *curl;
CURLcode res;
char *url = "
http://ifconfig.co/country";
curl = curl_easy_init();
if (!curl)
errx(1, "curl_easy_init()");
curl_easy_setopt(curl, CURLOPT_URL, url);
res = curl_easy_perform(curl);
if (!res)
curl_easy_strerror(res);
curl_easy_cleanup(curl);
return 0;
}