~ubuntu-branches/ubuntu/hardy/curl/hardy-updates

« back to all changes in this revision

Viewing changes to docs/libcurl/curl_formget.html

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2006-10-30 10:56:48 UTC
  • mfrom: (1.1.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20061030105648-uo8q8w9xklb40b4k
Tags: 7.15.5-1ubuntu1
* Merge from debian unstable. Remaining Ubuntu changes:
  - debian/control: Drop libdb4.2 build dependency.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<html><head>
 
2
<title>curl_formget man page</title>
 
3
<meta name="generator" content="roffit 0.7">
 
4
<STYLE type="text/css">
 
5
P.level0 {
 
6
 padding-left: 2em;
 
7
}
 
8
 
 
9
P.level1 {
 
10
 padding-left: 4em;
 
11
}
 
12
 
 
13
P.level2 {
 
14
 padding-left: 6em;
 
15
}
 
16
 
 
17
span.emphasis {
 
18
 font-style: italic;
 
19
}
 
20
 
 
21
span.bold {
 
22
 font-weight: bold;
 
23
}
 
24
 
 
25
span.manpage {
 
26
 font-weight: bold;
 
27
}
 
28
 
 
29
h2.nroffsh {
 
30
 background-color: #e0e0e0;
 
31
}
 
32
 
 
33
span.nroffip {
 
34
 font-weight: bold;
 
35
 font-size: 120%;
 
36
 font-family: monospace;
 
37
}
 
38
 
 
39
p.roffit {
 
40
 text-align: center;
 
41
 font-size: 80%;
 
42
}
 
43
</STYLE>
 
44
</head><body>
 
45
 
 
46
<p class="level0"><a name="NAME"></a><h2 class="nroffsh">NAME</h2>
 
47
<p class="level0">curl_formget - serialize a previously build multipart/formdata HTTP POST chain <a name="SYNOPSIS"></a><h2 class="nroffsh">SYNOPSIS</h2>
 
48
<p class="level0"><span Class="bold">#include &lt;curl/curl.h&gt;</span> 
 
49
<p class="level0"><span Class="bold">void curl_formget(struct curl_httppost * form,  void * arg,</span> <span Class="bold"> curl_formget_callback  append );</span> 
 
50
<p class="level0"><a name="DESCRIPTION"></a><h2 class="nroffsh">DESCRIPTION</h2>
 
51
<p class="level0">curl_formget() is used to serialize data previously built/appended with <a class="emphasis" href="./curl_formadd.html">curl_formadd(3)</a>. Accepts a void pointer as second argument which will be passed to the curl_formget_callback function. 
 
52
<p class="level0"><span Class="bold">typedef size_t (*curl_formget_callback)(void * arg,  const char * buf,</span> <span Class="bold"> size_t  len );</span> <pre>
 
53
<p class="level0"><p class="level0">The curl_formget_callback will be executed for each part of the HTTP POST
 
54
 chain. The void *arg pointer will be the one passed as second argument to
 
55
 curl_formget(). The character buffer passed to it must not be freed. The 
 
56
 callback should return the buffer length passed to it on success.
 
57
 </pre>
 
58
<a name="RETURN"></a><h2 class="nroffsh">RETURN VALUE</h2>
 
59
<p class="level0">0 means everything was ok, non-zero means an error occurred <a name="EXAMPLE"></a><h2 class="nroffsh">EXAMPLE</h2>
 
60
<p class="level0"><pre>
 
61
<p class="level0"><p class="level0">&nbsp;size_t print_httppost_callback(void *arg, const char *buf, size_t len)
 
62
 &nbsp;{
 
63
 &nbsp;  fwrite(buf, len, 1, stdout);
 
64
 &nbsp;  (*(size_t *) arg) += len;
 
65
 &nbsp;  return len;
 
66
 &nbsp;}
 
67
 &nbsp;size_t print_httppost(struct curl_httppost *post)
 
68
 &nbsp;{
 
69
 &nbsp;  size_t total_size = 0;
 
70
 &nbsp;  if(curl_formget(post, &total_size, print_httppost_callback)) {
 
71
 &nbsp;    return (size_t) -1;
 
72
 &nbsp;  }
 
73
 &nbsp;  return total_size;
 
74
 &nbsp;}
 
75
 </pre>
 
76
<a name="AVAILABILITY"></a><h2 class="nroffsh">AVAILABILITY</h2>
 
77
<p class="level0">This function was added in libcurl 7.15.5 <a name="SEE"></a><h2 class="nroffsh">SEE ALSO</h2>
 
78
<p class="level0"><a class="manpage" href="./curl_formadd.html">curl_formadd (3) </a> <p class="roffit">
 
79
 This HTML page was made with <a href="http://daniel.haxx.se/projects/roffit/">roffit</a>.
 
80
</body></html>