This file is indexed.

/usr/share/gtk-doc/html/libsoup-2.4/libsoup-2.4-HTML-Form-Support.html is in libsoup2.4-doc 2.52.2-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>HTML Form Support: libsoup Reference Manual</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="libsoup Reference Manual">
<link rel="up" href="ch04.html" title="Web Services APIs">
<link rel="prev" href="ch04.html" title="Web Services APIs">
<link rel="next" href="libsoup-2.4-XMLRPC-Support.html" title="XMLRPC Support">
<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#libsoup-2.4-HTML-Form-Support.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="ch04.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="ch04.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="libsoup-2.4-XMLRPC-Support.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="libsoup-2.4-HTML-Form-Support"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="libsoup-2.4-HTML-Form-Support.top_of_page"></a>HTML Form Support</span></h2>
<p>HTML Form Support — HTML form handling</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="libsoup-2.4-HTML-Form-Support.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"><span class="returnvalue">GHashTable</span></a> *
</td>
<td class="function_name">
<a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-decode" title="soup_form_decode ()">soup_form_decode</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"><span class="returnvalue">GHashTable</span></a> *
</td>
<td class="function_name">
<a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-decode-multipart" title="soup_form_decode_multipart ()">soup_form_decode_multipart</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-encode" title="soup_form_encode ()">soup_form_encode</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-encode-datalist" title="soup_form_encode_datalist ()">soup_form_encode_datalist</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-encode-hash" title="soup_form_encode_hash ()">soup_form_encode_hash</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-encode-valist" title="soup_form_encode_valist ()">soup_form_encode_valist</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="SoupMessage.html" title="SoupMessage"><span class="returnvalue">SoupMessage</span></a> *
</td>
<td class="function_name">
<a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-request-new" title="soup_form_request_new ()">soup_form_request_new</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="SoupMessage.html" title="SoupMessage"><span class="returnvalue">SoupMessage</span></a> *
</td>
<td class="function_name">
<a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-request-new-from-datalist" title="soup_form_request_new_from_datalist ()">soup_form_request_new_from_datalist</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="SoupMessage.html" title="SoupMessage"><span class="returnvalue">SoupMessage</span></a> *
</td>
<td class="function_name">
<a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-request-new-from-hash" title="soup_form_request_new_from_hash ()">soup_form_request_new_from_hash</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="SoupMessage.html" title="SoupMessage"><span class="returnvalue">SoupMessage</span></a> *
</td>
<td class="function_name">
<a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-request-new-from-multipart" title="soup_form_request_new_from_multipart ()">soup_form_request_new_from_multipart</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libsoup-2.4-HTML-Form-Support.other"></a><h2>Types and Values</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="name">
<col class="description">
</colgroup>
<tbody>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libsoup-2.4-HTML-Form-Support.html#SOUP-FORM-MIME-TYPE-MULTIPART:CAPS" title="SOUP_FORM_MIME_TYPE_MULTIPART">SOUP_FORM_MIME_TYPE_MULTIPART</a></td>
</tr>
<tr>
<td class="define_keyword">#define</td>
<td class="function_name"><a class="link" href="libsoup-2.4-HTML-Form-Support.html#SOUP-FORM-MIME-TYPE-URLENCODED:CAPS" title="SOUP_FORM_MIME_TYPE_URLENCODED">SOUP_FORM_MIME_TYPE_URLENCODED</a></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="libsoup-2.4-HTML-Form-Support.includes"></a><h2>Includes</h2>
<pre class="synopsis">#include &lt;libsoup/soup.h&gt;
</pre>
</div>
<div class="refsect1">
<a name="libsoup-2.4-HTML-Form-Support.description"></a><h2>Description</h2>
<p>libsoup contains several help methods for processing HTML forms as
defined by <a class="ulink" href="http://www.w3.org/TR/html401/interact/forms.html#h-17.13" target="_top">the
HTML 4.01 specification</a>.</p>
</div>
<div class="refsect1">
<a name="libsoup-2.4-HTML-Form-Support.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="soup-form-decode"></a><h3>soup_form_decode ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"><span class="returnvalue">GHashTable</span></a> *
soup_form_decode (<em class="parameter"><code>const <span class="type">char</span> *encoded_form</code></em>);</pre>
<p>Decodes <em class="parameter"><code>form</code></em>
, which is an urlencoded dataset as defined in the
HTML 4.01 spec.</p>
<div class="refsect3">
<a name="id-1.5.2.7.2.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>encoded_form</p></td>
<td class="parameter_description"><p>data of type "application/x-www-form-urlencoded"</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.2.7.2.6"></a><h4>Returns</h4>
<p> a hash
table containing the name/value pairs from <em class="parameter"><code>encoded_form</code></em>
, which you
can free with <a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#g-hash-table-destroy"><code class="function">g_hash_table_destroy()</code></a>. </p>
<p><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 utf8][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-form-decode-multipart"></a><h3>soup_form_decode_multipart ()</h3>
<pre class="programlisting"><a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"><span class="returnvalue">GHashTable</span></a> *
soup_form_decode_multipart (<em class="parameter"><code><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> *msg</code></em>,
                            <em class="parameter"><code>const <span class="type">char</span> *file_control_name</code></em>,
                            <em class="parameter"><code><span class="type">char</span> **filename</code></em>,
                            <em class="parameter"><code><span class="type">char</span> **content_type</code></em>,
                            <em class="parameter"><code><a class="link" href="SoupMessageBody.html#SoupBuffer"><span class="type">SoupBuffer</span></a> **file</code></em>);</pre>
<p>Decodes the "multipart/form-data" request in <em class="parameter"><code>msg</code></em>
; this is a
convenience method for the case when you have a single file upload
control in a form. (Or when you don't have any file upload
controls, but are still using "multipart/form-data" anyway.) Pass
the name of the file upload control in <em class="parameter"><code>file_control_name</code></em>
, and
<a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-decode-multipart" title="soup_form_decode_multipart ()"><code class="function">soup_form_decode_multipart()</code></a> will extract the uploaded file data
into <em class="parameter"><code>filename</code></em>
, <em class="parameter"><code>content_type</code></em>
, and <em class="parameter"><code>file</code></em>
. All of the other form
control data will be returned (as strings, as with
<a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-decode" title="soup_form_decode ()"><code class="function">soup_form_decode()</code></a>) in the returned <a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a>.</p>
<p>You may pass <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> for <em class="parameter"><code>filename</code></em>
, <em class="parameter"><code>content_type</code></em>
 and/or <em class="parameter"><code>file</code></em>
 if you do not
care about those fields. <a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-decode-multipart" title="soup_form_decode_multipart ()"><code class="function">soup_form_decode_multipart()</code></a> may also
return <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> in those fields if the client did not provide that
information. You must free the returned filename and content-type
with <a href="/usr/share/gtk-doc/html/glib/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a>, and the returned file data with <a class="link" href="SoupMessageBody.html#soup-buffer-free" title="soup_buffer_free ()"><code class="function">soup_buffer_free()</code></a>.</p>
<p>If you have a form with more than one file upload control, you will
need to decode it manually, using <a class="link" href="SoupMultipart.html#soup-multipart-new-from-message" title="soup_multipart_new_from_message ()"><code class="function">soup_multipart_new_from_message()</code></a>
and <a class="link" href="SoupMultipart.html#soup-multipart-get-part" title="soup_multipart_get_part ()"><code class="function">soup_multipart_get_part()</code></a>.</p>
<div class="refsect3">
<a name="id-1.5.2.7.3.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>msg</p></td>
<td class="parameter_description"><p>a <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a> containing a "multipart/form-data" request body</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>file_control_name</p></td>
<td class="parameter_description"><p> the name of the HTML file upload control, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>filename</p></td>
<td class="parameter_description"><p> return location for the name of the uploaded file, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>content_type</p></td>
<td class="parameter_description"><p> return location for the MIME type of the uploaded file, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
<tr>
<td class="parameter_name"><p>file</p></td>
<td class="parameter_description"><p> return location for the uploaded file data, or <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.2.7.3.8"></a><h4>Returns</h4>
<p>a hash table containing the name/value pairs (other than
<em class="parameter"><code>file_control_name</code></em>
) from <em class="parameter"><code>msg</code></em>
, which you can free with
<a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#g-hash-table-destroy"><code class="function">g_hash_table_destroy()</code></a>. On error, it will return <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>. </p>
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 utf8][<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="soup-form-encode"></a><h3>soup_form_encode ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
soup_form_encode (<em class="parameter"><code>const <span class="type">char</span> *first_field</code></em>,
                  <em class="parameter"><code>...</code></em>);</pre>
<p>Encodes the given field names and values into a value of type
"application/x-www-form-urlencoded", as defined in the HTML 4.01
spec.</p>
<p>This method requires you to know the names of the form fields (or
at the very least, the total number of fields) at compile time; for
working with dynamic forms, use <a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-encode-hash" title="soup_form_encode_hash ()"><code class="function">soup_form_encode_hash()</code></a> or
<a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-encode-datalist" title="soup_form_encode_datalist ()"><code class="function">soup_form_encode_datalist()</code></a>.</p>
<div class="refsect3">
<a name="id-1.5.2.7.4.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>first_field</p></td>
<td class="parameter_description"><p>name of the first form field</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>value of <em class="parameter"><code>first_field</code></em>
, followed by additional field names
and values, terminated by <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.2.7.4.7"></a><h4>Returns</h4>
<p> the encoded form</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-form-encode-datalist"></a><h3>soup_form_encode_datalist ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
soup_form_encode_datalist (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Keyed-Data-Lists.html#GData"><span class="type">GData</span></a> **form_data_set</code></em>);</pre>
<p>Encodes <em class="parameter"><code>form_data_set</code></em>
 into a value of type
"application/x-www-form-urlencoded", as defined in the HTML 4.01
spec. Unlike <a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-encode-hash" title="soup_form_encode_hash ()"><code class="function">soup_form_encode_hash()</code></a>, this preserves the ordering
of the form elements, which may be required in some situations.</p>
<div class="refsect3">
<a name="id-1.5.2.7.5.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>form_data_set</p></td>
<td class="parameter_description"><p>a datalist containing name/value pairs</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.2.7.5.6"></a><h4>Returns</h4>
<p> the encoded form</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-form-encode-hash"></a><h3>soup_form_encode_hash ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
soup_form_encode_hash (<em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *form_data_set</code></em>);</pre>
<p>Encodes <em class="parameter"><code>form_data_set</code></em>
 into a value of type
"application/x-www-form-urlencoded", as defined in the HTML 4.01
spec.</p>
<p>Note that the HTML spec states that "The control names/values are
listed in the order they appear in the document." Since this method
takes a hash table, it cannot enforce that; if you care about the
ordering of the form fields, use <a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-encode-datalist" title="soup_form_encode_datalist ()"><code class="function">soup_form_encode_datalist()</code></a>.</p>
<div class="refsect3">
<a name="id-1.5.2.7.6.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>form_data_set</p></td>
<td class="parameter_description"><p> a hash table containing
name/value pairs (as strings). </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 utf8]</span></td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.2.7.6.7"></a><h4>Returns</h4>
<p> the encoded form</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-form-encode-valist"></a><h3>soup_form_encode_valist ()</h3>
<pre class="programlisting"><span class="returnvalue">char</span> *
soup_form_encode_valist (<em class="parameter"><code>const <span class="type">char</span> *first_field</code></em>,
                         <em class="parameter"><code><span class="type">va_list</span> args</code></em>);</pre>
<p>See <a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-encode" title="soup_form_encode ()"><code class="function">soup_form_encode()</code></a>. This is mostly an internal method, used by
various other methods such as <a class="link" href="SoupURI.html#soup-uri-set-query-from-fields" title="soup_uri_set_query_from_fields ()"><code class="function">soup_uri_set_query_from_fields()</code></a> and
<a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-request-new" title="soup_form_request_new ()"><code class="function">soup_form_request_new()</code></a>.</p>
<div class="refsect3">
<a name="id-1.5.2.7.7.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>first_field</p></td>
<td class="parameter_description"><p>name of the first form field</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>args</p></td>
<td class="parameter_description"><p>pointer to additional values, as in <a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-encode" title="soup_form_encode ()"><code class="function">soup_form_encode()</code></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.2.7.7.6"></a><h4>Returns</h4>
<p> the encoded form</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-form-request-new"></a><h3>soup_form_request_new ()</h3>
<pre class="programlisting"><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="returnvalue">SoupMessage</span></a> *
soup_form_request_new (<em class="parameter"><code>const <span class="type">char</span> *method</code></em>,
                       <em class="parameter"><code>const <span class="type">char</span> *uri</code></em>,
                       <em class="parameter"><code>const <span class="type">char</span> *first_field</code></em>,
                       <em class="parameter"><code>...</code></em>);</pre>
<p>Creates a new <a class="link" href="SoupMessage.html" title="SoupMessage"><code class="literal">SoupMessage</code></a> and sets it up to send the given data
to <em class="parameter"><code>uri</code></em>
 via <em class="parameter"><code>method</code></em>
. (That is, if <em class="parameter"><code>method</code></em>
 is "GET", it will encode
the form data into <em class="parameter"><code>uri</code></em>
's query field, and if <em class="parameter"><code>method</code></em>
 is "POST", it
will encode it into the <a class="link" href="SoupMessage.html" title="SoupMessage"><code class="literal">SoupMessage</code></a>'s request_body.)</p>
<div class="refsect3">
<a name="id-1.5.2.7.8.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>method</p></td>
<td class="parameter_description"><p>the HTTP method, either "GET" or "POST"</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>the URI to send the form data to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>first_field</p></td>
<td class="parameter_description"><p>name of the first form field</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>...</p></td>
<td class="parameter_description"><p>value of <em class="parameter"><code>first_field</code></em>
, followed by additional field names
and values, terminated by <a href="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.2.7.8.6"></a><h4>Returns</h4>
<p> the new <a class="link" href="SoupMessage.html" title="SoupMessage"><code class="literal">SoupMessage</code></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-form-request-new-from-datalist"></a><h3>soup_form_request_new_from_datalist ()</h3>
<pre class="programlisting"><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="returnvalue">SoupMessage</span></a> *
soup_form_request_new_from_datalist (<em class="parameter"><code>const <span class="type">char</span> *method</code></em>,
                                     <em class="parameter"><code>const <span class="type">char</span> *uri</code></em>,
                                     <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Keyed-Data-Lists.html#GData"><span class="type">GData</span></a> **form_data_set</code></em>);</pre>
<p>Creates a new <a class="link" href="SoupMessage.html" title="SoupMessage"><code class="literal">SoupMessage</code></a> and sets it up to send <em class="parameter"><code>form_data_set</code></em>
 to
<em class="parameter"><code>uri</code></em>
 via <em class="parameter"><code>method</code></em>
, as with <a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-request-new" title="soup_form_request_new ()"><code class="function">soup_form_request_new()</code></a>.</p>
<div class="refsect3">
<a name="id-1.5.2.7.9.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>method</p></td>
<td class="parameter_description"><p>the HTTP method, either "GET" or "POST"</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>the URI to send the form data to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>form_data_set</p></td>
<td class="parameter_description"><p>the data to send to <em class="parameter"><code>uri</code></em>
</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.2.7.9.6"></a><h4>Returns</h4>
<p> the new <a class="link" href="SoupMessage.html" title="SoupMessage"><code class="literal">SoupMessage</code></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-form-request-new-from-hash"></a><h3>soup_form_request_new_from_hash ()</h3>
<pre class="programlisting"><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="returnvalue">SoupMessage</span></a> *
soup_form_request_new_from_hash (<em class="parameter"><code>const <span class="type">char</span> *method</code></em>,
                                 <em class="parameter"><code>const <span class="type">char</span> *uri</code></em>,
                                 <em class="parameter"><code><a href="/usr/share/gtk-doc/html/glib/glib-Hash-Tables.html#GHashTable"><span class="type">GHashTable</span></a> *form_data_set</code></em>);</pre>
<p>Creates a new <a class="link" href="SoupMessage.html" title="SoupMessage"><code class="literal">SoupMessage</code></a> and sets it up to send <em class="parameter"><code>form_data_set</code></em>
 to
<em class="parameter"><code>uri</code></em>
 via <em class="parameter"><code>method</code></em>
, as with <a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-request-new" title="soup_form_request_new ()"><code class="function">soup_form_request_new()</code></a>.</p>
<div class="refsect3">
<a name="id-1.5.2.7.10.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>method</p></td>
<td class="parameter_description"><p>the HTTP method, either "GET" or "POST"</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>the URI to send the form data to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>form_data_set</p></td>
<td class="parameter_description"><p> the data to send to <em class="parameter"><code>uri</code></em>
. </p></td>
<td class="parameter_annotations"><span class="annotation">[<acronym title="Generics and defining elements of containers and arrays."><span class="acronym">element-type</span></acronym> utf8 utf8]</span></td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.2.7.10.6"></a><h4>Returns</h4>
<p> the new <a class="link" href="SoupMessage.html" title="SoupMessage"><code class="literal">SoupMessage</code></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="soup-form-request-new-from-multipart"></a><h3>soup_form_request_new_from_multipart ()</h3>
<pre class="programlisting"><a class="link" href="SoupMessage.html" title="SoupMessage"><span class="returnvalue">SoupMessage</span></a> *
soup_form_request_new_from_multipart (<em class="parameter"><code>const <span class="type">char</span> *uri</code></em>,
                                      <em class="parameter"><code><a class="link" href="SoupMultipart.html" title="SoupMultipart"><span class="type">SoupMultipart</span></a> *multipart</code></em>);</pre>
<p>Creates a new <a class="link" href="SoupMessage.html" title="SoupMessage"><code class="literal">SoupMessage</code></a> and sets it up to send <em class="parameter"><code>multipart</code></em>
 to
<em class="parameter"><code>uri</code></em>
 via POST.</p>
<p>To send a <code class="literal">"multipart/form-data"</code> POST, first
create a <a class="link" href="SoupMultipart.html" title="SoupMultipart"><span class="type">SoupMultipart</span></a>, using <a class="link" href="libsoup-2.4-HTML-Form-Support.html#SOUP-FORM-MIME-TYPE-MULTIPART:CAPS" title="SOUP_FORM_MIME_TYPE_MULTIPART"><code class="literal">SOUP_FORM_MIME_TYPE_MULTIPART</code></a> as
the MIME type. Then use <a class="link" href="SoupMultipart.html#soup-multipart-append-form-string" title="soup_multipart_append_form_string ()"><code class="function">soup_multipart_append_form_string()</code></a> and
<a class="link" href="SoupMultipart.html#soup-multipart-append-form-file" title="soup_multipart_append_form_file ()"><code class="function">soup_multipart_append_form_file()</code></a> to add the value of each form
control to the multipart. (These are just convenience methods, and
you can use <a class="link" href="SoupMultipart.html#soup-multipart-append-part" title="soup_multipart_append_part ()"><code class="function">soup_multipart_append_part()</code></a> if you need greater
control over the part headers.) Finally, call
<a class="link" href="libsoup-2.4-HTML-Form-Support.html#soup-form-request-new-from-multipart" title="soup_form_request_new_from_multipart ()"><code class="function">soup_form_request_new_from_multipart()</code></a> to serialize the multipart
structure and create a <a class="link" href="SoupMessage.html" title="SoupMessage"><span class="type">SoupMessage</span></a>.</p>
<div class="refsect3">
<a name="id-1.5.2.7.11.6"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>uri</p></td>
<td class="parameter_description"><p>the URI to send the form data to</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>multipart</p></td>
<td class="parameter_description"><p>a "multipart/form-data" <a class="link" href="SoupMultipart.html" title="SoupMultipart"><span class="type">SoupMultipart</span></a></p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.5.2.7.11.7"></a><h4>Returns</h4>
<p> the new <a class="link" href="SoupMessage.html" title="SoupMessage"><code class="literal">SoupMessage</code></a>. </p>
<p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
</div>
<p class="since">Since: 2.26</p>
</div>
</div>
<div class="refsect1">
<a name="libsoup-2.4-HTML-Form-Support.other_details"></a><h2>Types and Values</h2>
<div class="refsect2">
<a name="SOUP-FORM-MIME-TYPE-MULTIPART:CAPS"></a><h3>SOUP_FORM_MIME_TYPE_MULTIPART</h3>
<pre class="programlisting">#define SOUP_FORM_MIME_TYPE_MULTIPART  "multipart/form-data"
</pre>
<p>A macro containing the value
<code class="literal">"multipart/form-data"</code>; the MIME type used for
posting form data that contains files to be uploaded.</p>
<p class="since">Since: 2.26</p>
</div>
<hr>
<div class="refsect2">
<a name="SOUP-FORM-MIME-TYPE-URLENCODED:CAPS"></a><h3>SOUP_FORM_MIME_TYPE_URLENCODED</h3>
<pre class="programlisting">#define SOUP_FORM_MIME_TYPE_URLENCODED "application/x-www-form-urlencoded"
</pre>
<p>A macro containing the value
<code class="literal">"application/x-www-form-urlencoded"</code>; the default
MIME type for POSTing HTML form data.</p>
<p class="since">Since: 2.26</p>
</div>
</div>
<div class="refsect1">
<a name="libsoup-2.4-HTML-Form-Support.see-also"></a><h2>See Also</h2>
<p><a class="link" href="SoupMultipart.html" title="SoupMultipart"><span class="type">SoupMultipart</span></a></p>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>