Skip to content

Instantly share code, notes, and snippets.

@pedrofaria
Created March 2, 2012 20:50
Show Gist options
  • Save pedrofaria/1961229 to your computer and use it in GitHub Desktop.
Save pedrofaria/1961229 to your computer and use it in GitHub Desktop.
import std;
extern "libcurl" {
FFIObject curl_easy_init();
Int curl_easy_setopt(FFIObject handle, Int option, String param);
Int curl_easy_perform(FFIObject handle);
Void curl_easy_cleanup(FFIObject handle);
}
FFIObject c, r;
c = curl_easy_init();
curl_easy_setopt(c, 10002, "http://www.google.com.br");
curl_easy_perform(c);
curl_easy_cleanup(c);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment