Mercurial > mxe-octave
annotate src/curl-test.c @ 2333:f653602a0500
Rebrand to new project name MXE
author | Volker Grabsch <vog@notjusthosting.com> |
---|---|
date | Wed, 28 Mar 2012 15:46:58 +0200 |
parents | 94cdbe762889 |
children | 8a6c466753e2 |
rev | line source |
---|---|
2333
f653602a0500
Rebrand to new project name MXE
Volker Grabsch <vog@notjusthosting.com>
parents:
1455
diff
changeset
|
1 /* This file is part of MXE. */ |
1455
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
2 /* See doc/index.html for further information. */ |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
3 |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
4 #include <curl/curl.h> |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
5 |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
6 int main(int argc, char *argv[]) |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
7 { |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
8 CURL *curl; |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
9 |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
10 (void)argc; |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
11 (void)argv; |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
12 |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
13 curl = curl_easy_init(); |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
14 if (!curl) { |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
15 return 1; |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
16 } |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
17 |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
18 curl_easy_setopt(curl, CURLOPT_URL, "http://example.com/"); |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
19 curl_easy_perform(curl); |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
20 |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
21 curl_easy_cleanup(curl); |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
22 return 0; |
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
23 } |