Mercurial > mxe-octave
annotate src/curl-test.c @ 1455:94cdbe762889
test program for package curl
author | Volker Grabsch <vog@notjusthosting.com> |
---|---|
date | Mon, 29 Nov 2010 01:16:25 +0100 |
parents | |
children | f653602a0500 |
rev | line source |
---|---|
1455
94cdbe762889
test program for package curl
Volker Grabsch <vog@notjusthosting.com>
parents:
diff
changeset
|
1 /* This file is part of mingw-cross-env. */ |
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 } |