aboutsummaryrefslogtreecommitdiff
path: root/docs/libcurl/opts/CURLOPT_HTTPGET.3
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2014-10-21 08:58:03 +0200
committerDaniel Stenberg <daniel@haxx.se>2014-10-21 08:58:24 +0200
commitc857bb68ec37f82b62238fca73942e6ede8bd8f7 (patch)
tree084c1ff2355e2b3ce77c8a69bec4657a78cbfcc2 /docs/libcurl/opts/CURLOPT_HTTPGET.3
parent005f2adaaa8025849760b30289e06916ea25f548 (diff)
opts: added examples
Diffstat (limited to 'docs/libcurl/opts/CURLOPT_HTTPGET.3')
-rw-r--r--docs/libcurl/opts/CURLOPT_HTTPGET.315
1 files changed, 13 insertions, 2 deletions
diff --git a/docs/libcurl/opts/CURLOPT_HTTPGET.3 b/docs/libcurl/opts/CURLOPT_HTTPGET.3
index 1e3e5664a..c14c38784 100644
--- a/docs/libcurl/opts/CURLOPT_HTTPGET.3
+++ b/docs/libcurl/opts/CURLOPT_HTTPGET.3
@@ -37,9 +37,20 @@ When setting \fICURLOPT_HTTPGET(3)\fP to 1, it will automatically set
.SH DEFAULT
0
.SH PROTOCOLS
-HTTP
+HTTP(S)
.SH EXAMPLE
-TODO
+.nf
+curl = curl_easy_init();
+if(curl) {
+ curl_easy_setopt(curl, CURLOPT_URL, "http://example.com");
+
+ /* use a GET to fetch this */
+ curl_easy_setopt(curl, CURLOPT_HTTPGET, 1L);
+
+ /* Perform the request */
+ curl_easy_perform(curl);
+}
+.fi
.SH AVAILABILITY
Along with HTTP
.SH RETURN VALUE