mirror of
https://github.com/moparisthebest/curl
synced 2024-08-13 17:03:50 -04:00
corrected example
This commit is contained in:
parent
d465199411
commit
75899741b9
@ -24,8 +24,9 @@ The list should be freed again (after usage) with
|
|||||||
A null pointer is returned if anything went wrong, otherwise the new list
|
A null pointer is returned if anything went wrong, otherwise the new list
|
||||||
pointer is returned.
|
pointer is returned.
|
||||||
.SH EXAMPLE
|
.SH EXAMPLE
|
||||||
|
.nf
|
||||||
CURL handle;
|
CURL handle;
|
||||||
curl_slist *slist=NULL;
|
struct curl_slist *slist=NULL;
|
||||||
|
|
||||||
slist = curl_slist_append(slist, "pragma:");
|
slist = curl_slist_append(slist, "pragma:");
|
||||||
curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist);
|
curl_easy_setopt(handle, CURLOPT_HTTPHEADER, slist);
|
||||||
@ -33,5 +34,6 @@ pointer is returned.
|
|||||||
curl_easy_perform(handle);
|
curl_easy_perform(handle);
|
||||||
|
|
||||||
curl_slist_free_all(slist); /* free the list again */
|
curl_slist_free_all(slist); /* free the list again */
|
||||||
|
.fi
|
||||||
.SH "SEE ALSO"
|
.SH "SEE ALSO"
|
||||||
.BR curl_slist_free_all "(3), "
|
.BR curl_slist_free_all "(3), "
|
||||||
|
Loading…
Reference in New Issue
Block a user