~ubuntu-branches/ubuntu/gutsy/curl/gutsy

« back to all changes in this revision

Viewing changes to docs/examples/post-callback.c

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-06-29 15:04:24 UTC
  • mto: This revision was merged to the branch mainline in revision 8.
  • Revision ID: james.westby@ubuntu.com-20060629150424-be178abcwks1n519
Tags: upstream-7.15.4
ImportĀ upstreamĀ versionĀ 7.15.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 *                            | (__| |_| |  _ <| |___
6
6
 *                             \___|\___/|_| \_\_____|
7
7
 *
8
 
 * $Id: post-callback.c,v 1.4 2004/08/23 14:22:44 bagder Exp $
 
8
 * $Id: post-callback.c,v 1.5 2005/12/14 13:10:14 bagder Exp $
9
9
 *
10
10
 * An example source code that issues a HTTP POST and we provide the actual
11
11
 * data through a read callback.
78
78
      curl_slist *chunk = NULL;
79
79
 
80
80
      chunk = curl_slist_append(chunk, "Transfer-Encoding: chunked");
81
 
      res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER);
 
81
      res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
82
82
      /* use curl_slist_free_all() after the *perform() call to free this
83
83
         list again */
84
84
    }
101
101
      curl_slist *chunk = NULL;
102
102
 
103
103
      chunk = curl_slist_append(chunk, "Expect:");
104
 
      res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER);
 
104
      res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);
105
105
      /* use curl_slist_free_all() after the *perform() call to free this
106
106
         list again */
107
107
    }