#include <curl/curl.h>
#include <curl/easy.h>
#include <stdio.h>

int
main(void)
{
	CURL *curl;
	CURLcode res;

	curl = curl_easy_init();
	if(!curl)
	{
		fprintf(stderr, "Curl init failed!");
		return 1;
	}
	curl_easy_setopt(curl,CURLOPT_URL , "https://wttr.in/?1A");

	res = curl_easy_perform(curl);
	
	if(res != CURLE_OK)
		fprintf(stderr, "curl failed with %s\n", curl_easy_strerror(res));
	else
		fprintf(stdout, "curl succeded with code %d\n", res);

	curl_easy_cleanup(curl);
	return 0;
}
