File: Nethttp_client.html

package info (click to toggle)
ocamlnet 4.1.9-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 54,024 kB
  • sloc: ml: 151,939; ansic: 11,071; sh: 2,003; makefile: 1,310
file content (1221 lines) | stat: -rw-r--r-- 70,803 bytes parent folder | download | duplicates (4)
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
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="Start" href="index.html">
<link rel="previous" href="Nethttp_client_conncache.html">
<link rel="next" href="Nettelnet_client.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of extensions" rel=Appendix href="index_extensions.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class attributes" rel=Appendix href="index_attributes.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of classes" rel=Appendix href="index_classes.html">
<link title="Index of class types" rel=Appendix href="index_class_types.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Index of module types" rel=Appendix href="index_module_types.html">
<link title="Uq_gtk" rel="Chapter" href="Uq_gtk.html">
<link title="Uq_tcl" rel="Chapter" href="Uq_tcl.html">
<link title="Equeue" rel="Chapter" href="Equeue.html">
<link title="Unixqueue" rel="Chapter" href="Unixqueue.html">
<link title="Unixqueue_pollset" rel="Chapter" href="Unixqueue_pollset.html">
<link title="Unixqueue_select" rel="Chapter" href="Unixqueue_select.html">
<link title="Uq_resolver" rel="Chapter" href="Uq_resolver.html">
<link title="Uq_engines" rel="Chapter" href="Uq_engines.html">
<link title="Uq_multiplex" rel="Chapter" href="Uq_multiplex.html">
<link title="Uq_transfer" rel="Chapter" href="Uq_transfer.html">
<link title="Uq_socks5" rel="Chapter" href="Uq_socks5.html">
<link title="Uq_io" rel="Chapter" href="Uq_io.html">
<link title="Uq_lwt" rel="Chapter" href="Uq_lwt.html">
<link title="Uq_libevent" rel="Chapter" href="Uq_libevent.html">
<link title="Uq_mt" rel="Chapter" href="Uq_mt.html">
<link title="Uq_client" rel="Chapter" href="Uq_client.html">
<link title="Uq_server" rel="Chapter" href="Uq_server.html">
<link title="Uq_datagram" rel="Chapter" href="Uq_datagram.html">
<link title="Uq_engines_compat" rel="Chapter" href="Uq_engines_compat.html">
<link title="Equeue_intro" rel="Chapter" href="Equeue_intro.html">
<link title="Equeue_howto" rel="Chapter" href="Equeue_howto.html">
<link title="Netcamlbox" rel="Chapter" href="Netcamlbox.html">
<link title="Netcgi_apache" rel="Chapter" href="Netcgi_apache.html">
<link title="Netcgi_modtpl" rel="Chapter" href="Netcgi_modtpl.html">
<link title="Netcgi_plex" rel="Chapter" href="Netcgi_plex.html">
<link title="Netcgi_common" rel="Chapter" href="Netcgi_common.html">
<link title="Netcgi" rel="Chapter" href="Netcgi.html">
<link title="Netcgi_ajp" rel="Chapter" href="Netcgi_ajp.html">
<link title="Netcgi_scgi" rel="Chapter" href="Netcgi_scgi.html">
<link title="Netcgi_cgi" rel="Chapter" href="Netcgi_cgi.html">
<link title="Netcgi_fcgi" rel="Chapter" href="Netcgi_fcgi.html">
<link title="Netcgi_dbi" rel="Chapter" href="Netcgi_dbi.html">
<link title="Netcgi1_compat" rel="Chapter" href="Netcgi1_compat.html">
<link title="Netcgi_test" rel="Chapter" href="Netcgi_test.html">
<link title="Netcgi_porting" rel="Chapter" href="Netcgi_porting.html">
<link title="Nethttp_client_conncache" rel="Chapter" href="Nethttp_client_conncache.html">
<link title="Nethttp_client" rel="Chapter" href="Nethttp_client.html">
<link title="Nettelnet_client" rel="Chapter" href="Nettelnet_client.html">
<link title="Netftp_data_endpoint" rel="Chapter" href="Netftp_data_endpoint.html">
<link title="Netftp_client" rel="Chapter" href="Netftp_client.html">
<link title="Nethttp_fs" rel="Chapter" href="Nethttp_fs.html">
<link title="Netftp_fs" rel="Chapter" href="Netftp_fs.html">
<link title="Netsmtp" rel="Chapter" href="Netsmtp.html">
<link title="Netpop" rel="Chapter" href="Netpop.html">
<link title="Netldap" rel="Chapter" href="Netldap.html">
<link title="Netclient_tut" rel="Chapter" href="Netclient_tut.html">
<link title="Netgss_bindings" rel="Chapter" href="Netgss_bindings.html">
<link title="Netgss" rel="Chapter" href="Netgss.html">
<link title="Nethttpd_types" rel="Chapter" href="Nethttpd_types.html">
<link title="Nethttpd_kernel" rel="Chapter" href="Nethttpd_kernel.html">
<link title="Nethttpd_reactor" rel="Chapter" href="Nethttpd_reactor.html">
<link title="Nethttpd_engine" rel="Chapter" href="Nethttpd_engine.html">
<link title="Nethttpd_services" rel="Chapter" href="Nethttpd_services.html">
<link title="Nethttpd_plex" rel="Chapter" href="Nethttpd_plex.html">
<link title="Nethttpd_util" rel="Chapter" href="Nethttpd_util.html">
<link title="Nethttpd_intro" rel="Chapter" href="Nethttpd_intro.html">
<link title="Netmcore" rel="Chapter" href="Netmcore.html">
<link title="Netmcore_camlbox" rel="Chapter" href="Netmcore_camlbox.html">
<link title="Netmcore_mempool" rel="Chapter" href="Netmcore_mempool.html">
<link title="Netmcore_heap" rel="Chapter" href="Netmcore_heap.html">
<link title="Netmcore_ref" rel="Chapter" href="Netmcore_ref.html">
<link title="Netmcore_array" rel="Chapter" href="Netmcore_array.html">
<link title="Netmcore_sem" rel="Chapter" href="Netmcore_sem.html">
<link title="Netmcore_mutex" rel="Chapter" href="Netmcore_mutex.html">
<link title="Netmcore_condition" rel="Chapter" href="Netmcore_condition.html">
<link title="Netmcore_queue" rel="Chapter" href="Netmcore_queue.html">
<link title="Netmcore_buffer" rel="Chapter" href="Netmcore_buffer.html">
<link title="Netmcore_matrix" rel="Chapter" href="Netmcore_matrix.html">
<link title="Netmcore_hashtbl" rel="Chapter" href="Netmcore_hashtbl.html">
<link title="Netmcore_process" rel="Chapter" href="Netmcore_process.html">
<link title="Netmcore_tut" rel="Chapter" href="Netmcore_tut.html">
<link title="Netmcore_basics" rel="Chapter" href="Netmcore_basics.html">
<link title="Netplex_types" rel="Chapter" href="Netplex_types.html">
<link title="Netplex_mp" rel="Chapter" href="Netplex_mp.html">
<link title="Netplex_mt" rel="Chapter" href="Netplex_mt.html">
<link title="Netplex_log" rel="Chapter" href="Netplex_log.html">
<link title="Netplex_controller" rel="Chapter" href="Netplex_controller.html">
<link title="Netplex_container" rel="Chapter" href="Netplex_container.html">
<link title="Netplex_sockserv" rel="Chapter" href="Netplex_sockserv.html">
<link title="Netplex_workload" rel="Chapter" href="Netplex_workload.html">
<link title="Netplex_main" rel="Chapter" href="Netplex_main.html">
<link title="Netplex_config" rel="Chapter" href="Netplex_config.html">
<link title="Netplex_kit" rel="Chapter" href="Netplex_kit.html">
<link title="Rpc_netplex" rel="Chapter" href="Rpc_netplex.html">
<link title="Netplex_cenv" rel="Chapter" href="Netplex_cenv.html">
<link title="Netplex_semaphore" rel="Chapter" href="Netplex_semaphore.html">
<link title="Netplex_sharedvar" rel="Chapter" href="Netplex_sharedvar.html">
<link title="Netplex_mutex" rel="Chapter" href="Netplex_mutex.html">
<link title="Netplex_encap" rel="Chapter" href="Netplex_encap.html">
<link title="Netplex_mbox" rel="Chapter" href="Netplex_mbox.html">
<link title="Netplex_internal" rel="Chapter" href="Netplex_internal.html">
<link title="Netplex_intro" rel="Chapter" href="Netplex_intro.html">
<link title="Netplex_advanced" rel="Chapter" href="Netplex_advanced.html">
<link title="Netplex_admin" rel="Chapter" href="Netplex_admin.html">
<link title="Netshm" rel="Chapter" href="Netshm.html">
<link title="Netshm_data" rel="Chapter" href="Netshm_data.html">
<link title="Netshm_hashtbl" rel="Chapter" href="Netshm_hashtbl.html">
<link title="Netshm_array" rel="Chapter" href="Netshm_array.html">
<link title="Netshm_intro" rel="Chapter" href="Netshm_intro.html">
<link title="Netstring_pcre" rel="Chapter" href="Netstring_pcre.html">
<link title="Netconversion" rel="Chapter" href="Netconversion.html">
<link title="Netchannels" rel="Chapter" href="Netchannels.html">
<link title="Netstream" rel="Chapter" href="Netstream.html">
<link title="Netmime_string" rel="Chapter" href="Netmime_string.html">
<link title="Netmime" rel="Chapter" href="Netmime.html">
<link title="Netsendmail" rel="Chapter" href="Netsendmail.html">
<link title="Neturl" rel="Chapter" href="Neturl.html">
<link title="Netaddress" rel="Chapter" href="Netaddress.html">
<link title="Netbuffer" rel="Chapter" href="Netbuffer.html">
<link title="Netmime_header" rel="Chapter" href="Netmime_header.html">
<link title="Netmime_channels" rel="Chapter" href="Netmime_channels.html">
<link title="Neturl_ldap" rel="Chapter" href="Neturl_ldap.html">
<link title="Netdate" rel="Chapter" href="Netdate.html">
<link title="Netencoding" rel="Chapter" href="Netencoding.html">
<link title="Netulex" rel="Chapter" href="Netulex.html">
<link title="Netaccel" rel="Chapter" href="Netaccel.html">
<link title="Netaccel_link" rel="Chapter" href="Netaccel_link.html">
<link title="Nethtml" rel="Chapter" href="Nethtml.html">
<link title="Netstring_str" rel="Chapter" href="Netstring_str.html">
<link title="Netmappings" rel="Chapter" href="Netmappings.html">
<link title="Netaux" rel="Chapter" href="Netaux.html">
<link title="Nethttp" rel="Chapter" href="Nethttp.html">
<link title="Netpagebuffer" rel="Chapter" href="Netpagebuffer.html">
<link title="Netfs" rel="Chapter" href="Netfs.html">
<link title="Netglob" rel="Chapter" href="Netglob.html">
<link title="Netauth" rel="Chapter" href="Netauth.html">
<link title="Netsockaddr" rel="Chapter" href="Netsockaddr.html">
<link title="Netnumber" rel="Chapter" href="Netnumber.html">
<link title="Netxdr_mstring" rel="Chapter" href="Netxdr_mstring.html">
<link title="Netxdr" rel="Chapter" href="Netxdr.html">
<link title="Netcompression" rel="Chapter" href="Netcompression.html">
<link title="Netunichar" rel="Chapter" href="Netunichar.html">
<link title="Netasn1" rel="Chapter" href="Netasn1.html">
<link title="Netasn1_encode" rel="Chapter" href="Netasn1_encode.html">
<link title="Netoid" rel="Chapter" href="Netoid.html">
<link title="Netstring_tstring" rel="Chapter" href="Netstring_tstring.html">
<link title="Netdn" rel="Chapter" href="Netdn.html">
<link title="Netx509" rel="Chapter" href="Netx509.html">
<link title="Netascii_armor" rel="Chapter" href="Netascii_armor.html">
<link title="Nettls_support" rel="Chapter" href="Nettls_support.html">
<link title="Netmech_scram" rel="Chapter" href="Netmech_scram.html">
<link title="Netmech_scram_gssapi" rel="Chapter" href="Netmech_scram_gssapi.html">
<link title="Netmech_scram_sasl" rel="Chapter" href="Netmech_scram_sasl.html">
<link title="Netmech_scram_http" rel="Chapter" href="Netmech_scram_http.html">
<link title="Netgssapi_support" rel="Chapter" href="Netgssapi_support.html">
<link title="Netgssapi_auth" rel="Chapter" href="Netgssapi_auth.html">
<link title="Netchannels_crypto" rel="Chapter" href="Netchannels_crypto.html">
<link title="Netx509_pubkey" rel="Chapter" href="Netx509_pubkey.html">
<link title="Netx509_pubkey_crypto" rel="Chapter" href="Netx509_pubkey_crypto.html">
<link title="Netsaslprep" rel="Chapter" href="Netsaslprep.html">
<link title="Netmech_plain_sasl" rel="Chapter" href="Netmech_plain_sasl.html">
<link title="Netmech_crammd5_sasl" rel="Chapter" href="Netmech_crammd5_sasl.html">
<link title="Netmech_digest_sasl" rel="Chapter" href="Netmech_digest_sasl.html">
<link title="Netmech_digest_http" rel="Chapter" href="Netmech_digest_http.html">
<link title="Netmech_krb5_sasl" rel="Chapter" href="Netmech_krb5_sasl.html">
<link title="Netmech_gs2_sasl" rel="Chapter" href="Netmech_gs2_sasl.html">
<link title="Netmech_spnego_http" rel="Chapter" href="Netmech_spnego_http.html">
<link title="Netchannels_tut" rel="Chapter" href="Netchannels_tut.html">
<link title="Netmime_tut" rel="Chapter" href="Netmime_tut.html">
<link title="Netsendmail_tut" rel="Chapter" href="Netsendmail_tut.html">
<link title="Netulex_tut" rel="Chapter" href="Netulex_tut.html">
<link title="Neturl_tut" rel="Chapter" href="Neturl_tut.html">
<link title="Netsys" rel="Chapter" href="Netsys.html">
<link title="Netsys_posix" rel="Chapter" href="Netsys_posix.html">
<link title="Netsys_pollset" rel="Chapter" href="Netsys_pollset.html">
<link title="Netlog" rel="Chapter" href="Netlog.html">
<link title="Netexn" rel="Chapter" href="Netexn.html">
<link title="Netsys_win32" rel="Chapter" href="Netsys_win32.html">
<link title="Netsys_pollset_posix" rel="Chapter" href="Netsys_pollset_posix.html">
<link title="Netsys_pollset_win32" rel="Chapter" href="Netsys_pollset_win32.html">
<link title="Netsys_pollset_generic" rel="Chapter" href="Netsys_pollset_generic.html">
<link title="Netsys_signal" rel="Chapter" href="Netsys_signal.html">
<link title="Netsys_oothr" rel="Chapter" href="Netsys_oothr.html">
<link title="Netsys_xdr" rel="Chapter" href="Netsys_xdr.html">
<link title="Netsys_rng" rel="Chapter" href="Netsys_rng.html">
<link title="Netsys_crypto_types" rel="Chapter" href="Netsys_crypto_types.html">
<link title="Netsys_types" rel="Chapter" href="Netsys_types.html">
<link title="Netsys_mem" rel="Chapter" href="Netsys_mem.html">
<link title="Netsys_tmp" rel="Chapter" href="Netsys_tmp.html">
<link title="Netsys_sem" rel="Chapter" href="Netsys_sem.html">
<link title="Netsys_pmanage" rel="Chapter" href="Netsys_pmanage.html">
<link title="Netsys_crypto" rel="Chapter" href="Netsys_crypto.html">
<link title="Netsys_tls" rel="Chapter" href="Netsys_tls.html">
<link title="Netsys_ciphers" rel="Chapter" href="Netsys_ciphers.html">
<link title="Netsys_digests" rel="Chapter" href="Netsys_digests.html">
<link title="Netsys_crypto_modes" rel="Chapter" href="Netsys_crypto_modes.html">
<link title="Netsys_gssapi" rel="Chapter" href="Netsys_gssapi.html">
<link title="Netsys_sasl_types" rel="Chapter" href="Netsys_sasl_types.html">
<link title="Netsys_sasl" rel="Chapter" href="Netsys_sasl.html">
<link title="Netsys_polypipe" rel="Chapter" href="Netsys_polypipe.html">
<link title="Netsys_polysocket" rel="Chapter" href="Netsys_polysocket.html">
<link title="Netsys_global" rel="Chapter" href="Netsys_global.html">
<link title="Nettls_gnutls_bindings" rel="Chapter" href="Nettls_gnutls_bindings.html">
<link title="Nettls_nettle_bindings" rel="Chapter" href="Nettls_nettle_bindings.html">
<link title="Nettls_gnutls" rel="Chapter" href="Nettls_gnutls.html">
<link title="Netunidata" rel="Chapter" href="Netunidata.html">
<link title="Netgzip" rel="Chapter" href="Netgzip.html">
<link title="Rpc_auth_local" rel="Chapter" href="Rpc_auth_local.html">
<link title="Rpc_xti_client" rel="Chapter" href="Rpc_xti_client.html">
<link title="Rpc" rel="Chapter" href="Rpc.html">
<link title="Rpc_program" rel="Chapter" href="Rpc_program.html">
<link title="Rpc_util" rel="Chapter" href="Rpc_util.html">
<link title="Rpc_portmapper_aux" rel="Chapter" href="Rpc_portmapper_aux.html">
<link title="Rpc_packer" rel="Chapter" href="Rpc_packer.html">
<link title="Rpc_transport" rel="Chapter" href="Rpc_transport.html">
<link title="Rpc_client" rel="Chapter" href="Rpc_client.html">
<link title="Rpc_simple_client" rel="Chapter" href="Rpc_simple_client.html">
<link title="Rpc_portmapper_clnt" rel="Chapter" href="Rpc_portmapper_clnt.html">
<link title="Rpc_portmapper" rel="Chapter" href="Rpc_portmapper.html">
<link title="Rpc_server" rel="Chapter" href="Rpc_server.html">
<link title="Rpc_auth_sys" rel="Chapter" href="Rpc_auth_sys.html">
<link title="Rpc_auth_gssapi" rel="Chapter" href="Rpc_auth_gssapi.html">
<link title="Rpc_proxy" rel="Chapter" href="Rpc_proxy.html">
<link title="Rpc_intro" rel="Chapter" href="Rpc_intro.html">
<link title="Rpc_mapping_ref" rel="Chapter" href="Rpc_mapping_ref.html">
<link title="Rpc_intro_gss" rel="Chapter" href="Rpc_intro_gss.html">
<link title="Shell_sys" rel="Chapter" href="Shell_sys.html">
<link title="Shell" rel="Chapter" href="Shell.html">
<link title="Shell_uq" rel="Chapter" href="Shell_uq.html">
<link title="Shell_fs" rel="Chapter" href="Shell_fs.html">
<link title="Shell_intro" rel="Chapter" href="Shell_intro.html">
<link title="Intro" rel="Chapter" href="Intro.html">
<link title="Platform" rel="Chapter" href="Platform.html">
<link title="Foreword" rel="Chapter" href="Foreword.html">
<link title="Ipv6" rel="Chapter" href="Ipv6.html">
<link title="Regexp" rel="Chapter" href="Regexp.html">
<link title="Tls" rel="Chapter" href="Tls.html">
<link title="Crypto" rel="Chapter" href="Crypto.html">
<link title="Authentication" rel="Chapter" href="Authentication.html">
<link title="Credentials" rel="Chapter" href="Credentials.html">
<link title="Gssapi" rel="Chapter" href="Gssapi.html">
<link title="Ocamlnet4" rel="Chapter" href="Ocamlnet4.html">
<link title="Get" rel="Chapter" href="Get.html"><link title="Types and Exceptions" rel="Section" href="#1_TypesandExceptions">
<link title="HTTP methods" rel="Section" href="#1_HTTPmethods">
<link title="Authentication" rel="Section" href="#1_Authentication">
<link title="Transport" rel="Section" href="#1_Transport">
<link title="Pipelines" rel="Section" href="#1_Pipelines">
<link title="Convenience module for simple applications" rel="Section" href="#1_Conveniencemoduleforsimpleapplications">
<link title="Debugging" rel="Section" href="#1_Debugging">
<link title="Auxiliary pipeline functions" rel="Subsection" href="#2_Auxiliarypipelinefunctions">
<title>Ocamlnet 4 Reference Manual : Nethttp_client</title>
</head>
<body>
<div class="navbar"><a class="pre" href="Nethttp_client_conncache.html" title="Nethttp_client_conncache">Previous</a>
&nbsp;<a class="up" href="index.html" title="Index">Up</a>
&nbsp;<a class="post" href="Nettelnet_client.html" title="Nettelnet_client">Next</a>
</div>
<h1>Module <a href="type_Nethttp_client.html">Nethttp_client</a></h1>

<pre><span id="MODULENethttp_client"><span class="keyword">module</span> Nethttp_client</span>: <code class="code">sig</code> <a href="Nethttp_client.html">..</a> <code class="code">end</code></pre><div class="info module top">
<div class="info-desc">
<p>HTTP 1.1 client</p>
</div>
</div>
<hr width="100%">
<p><b>Note for beginners:</b> There is a simplified interface called
 <a href="Nethttp_client.Convenience.html"><code class="code">Nethttp_client.Convenience</code></a>.</p>
<p>Implements the following advanced features:</p>
<ul>
<li>chunked message transport</li>
<li>persistent connections</li>
<li>connections in pipelining mode ("full duplex" connections)</li>
<li>modular authentication methods, currently Basic, Digest, and Negotiate</li>
<li>event-driven implementation; allows concurrent service for
    several network connections </li>
<li>HTTP proxy support, also with Basic and Digest
    authentication</li>
<li>SOCKS proxy support (1)</li>
<li>HTTPS support is now built-in, but requires that a TLS provider is
    initialized (see <a href="Tls.html"><code class="code">Tls</code></a> for more information).
    HTTPS proxies are also supported (CONNECT method) (1)</li>
<li>Automatic and configurable retry of failed idempotent requests</li>
<li>Redirections can be followed automatically </li>
<li>Compressed message bodies can be automatically decoded (gzip only,
    method <code class="code">set_accept_encoding</code>) (1)</li>
</ul>
<p>Left out:</p>
<ul>
<li>multipart messages, including multipart/byterange</li>
<li>content digests specified by RFC 2068 and 2069   (2)</li>
<li>content negotiation   (2)</li>
<li>conditional and partial GET   (2)</li>
<li>client-side caching   (2)</li>
<li>HTTP/0.9 compatibility</li>
</ul>
<p>(1) Since Ocamlnet-3.3</p>

<p>(2) These features can be implemented on top of this module if really needed,
     but there is no special support for them.</p>

<p>Related modules/software:</p>
<ul>
<li><a href="Nethttp_fs.html"><code class="code">Nethttp_fs</code></a> allows you to access HTTP servers in the style of filesystems</li>
<li>WebDAV: If you are looking for WebDAV there is an extension of this module:
   <a href="http://oss.wink.com/webdav/"> Webdav</a>, which is separately available.</li>
</ul>
<p><b>Thread safety</b></p>

<p>The module can be compiled such that it is thread-safe. In particular,
 one has to link the http_client_mt.cm<code class="code">xo</code> object, and thread-safety is
 restricted to the following kinds of usage:</p>
<ul>
<li>The golden rule is that threads must not share pipeline objects.
   If every thread uses its own pipeline, every thread will have its own
   set of state variables.
   It is not detected if two threads errornously share a pipeline,
   neither by an error message nor by implicit serialization. Strange
   things may happen.</li>
<li>The same applies to the other objects, e.g. http_call objects</li>
<li>The <code class="code">Convenience</code> module even serializes; see below.</li>
</ul>
<h2 id="1_TypesandExceptions">Types and Exceptions</h2>
<pre><span id="EXCEPTIONBad_message"><span class="keyword">exception</span> Bad_message</span> <span class="keyword">of</span> <code class="type">string</code></pre>
<div class="info ">
<div class="info-desc">
<p>The server sent a message which cannot be interpreted. The string
 indicates the reason.</p>
</div>
</div>

<pre><span id="EXCEPTIONNo_reply"><span class="keyword">exception</span> No_reply</span></pre>
<div class="info ">
<div class="info-desc">
<p>There was no response to the request because some other request failed
 earlier and it was not allowed to send the request again.</p>
</div>
</div>

<pre><span id="EXCEPTIONToo_many_redirections"><span class="keyword">exception</span> Too_many_redirections</span></pre>
<div class="info ">
<div class="info-desc">
<p>While following redirections the limit has been reached</p>
</div>
</div>

<pre><span id="EXCEPTIONName_resolution_error"><span class="keyword">exception</span> Name_resolution_error</span> <span class="keyword">of</span> <code class="type">string</code></pre>
<div class="info ">
<div class="info-desc">
<p>Could not resolve this name - same as <code class="code">Uq_engines.Host_not_found</code></p>
</div>
</div>

<pre><span id="EXCEPTIONURL_syntax_error"><span class="keyword">exception</span> URL_syntax_error</span> <span class="keyword">of</span> <code class="type">string</code></pre>
<div class="info ">
<div class="info-desc">
<p>This URL cannot be parsed after a redirection has been followed.</p>
</div>
</div>

<pre><span id="EXCEPTIONTimeout"><span class="keyword">exception</span> Timeout</span> <span class="keyword">of</span> <code class="type">string</code></pre>
<div class="info ">
<div class="info-desc">
<p>A timeout. The string explains which connection is affected.
      <b>New since Ocamlnet-3.3.</b></p>
</div>
</div>

<pre><span id="EXCEPTIONProxy_error"><span class="keyword">exception</span> Proxy_error</span> <span class="keyword">of</span> <code class="type">int</code></pre>
<div class="info ">
<div class="info-desc">
<p>An error status from a proxy. This is only used when extra proxy messages
      are used to configure the proxy (e.g. the CONNECT message).</p>
</div>
</div>

<pre><span id="EXCEPTIONResponse_too_large"><span class="keyword">exception</span> Response_too_large</span></pre>
<div class="info ">
<div class="info-desc">
<p>The length of the response exceeds the configured maximum</p>
</div>
</div>

<pre><span id="EXCEPTIONHttp_protocol"><span class="keyword">exception</span> Http_protocol</span> <span class="keyword">of</span> <code class="type">exn</code></pre>
<div class="info ">
<div class="info-desc">
<p>The request could not be processed because the exception condition 
 was raised. The inner exception is one of the above defined.</p>
</div>
</div>

<pre><span id="EXCEPTIONHttp_error"><span class="keyword">exception</span> Http_error</span> <span class="keyword">of</span> <code class="type">(int * string)</code></pre>
<div class="info ">
<div class="info-desc">
<p><b>Deprecated in the scope of <code class="code">pipeline</code>.</b> 
 The server sent an error message. The left component of the pair is
 the error code, the right component is the error text.
 This exception is only used by <code class="code">get_resp_body</code>, and by the
 <a href="Nethttp_client.Convenience.html"><code class="code">Nethttp_client.Convenience</code></a> module. Note that for the latter
 usage the exception does not count as deprecated.</p>
</div>
</div>

<pre><span id="TYPEstatus"><span class="keyword">type</span> <code class="type"></code>status</span> = <code class="type">[ `Client_error<br>       | `Http_protocol_error of exn<br>       | `Redirection<br>       | `Server_error<br>       | `Successful<br>       | `Unserved ]</code> </pre>
<div class="info ">
<div class="info-desc">
<p>Condensed status information of a HTTP call:</p>
<ul>
<li><code class="code">`Unserved</code>: The call has not yet been finished</li>
<li><code class="code">`HTTP_protocol_error e</code>: An error on HTTP level occurred. Corresponds
   to the exception <code class="code">Http_protocol</code>.</li>
<li><code class="code">`Successful</code>: The call is successful, and the response code is between
   200 and 299.</li>
<li><code class="code">`Redirection</code>: The call is successful, and the response code is
   between 300 and 399.</li>
<li><code class="code">`Client_error</code>: The call failed with a response code between 400 and
   499.</li>
<li><code class="code">`Server_error</code>: The call failed for any other reason.</li>
</ul>
</div>
</div>


<pre><span id="TYPEauth_status"><span class="keyword">type</span> <code class="type">'a</code> auth_status</span> = <code class="type">[ `Auth_error<br>       | `Continue of 'a<br>       | `Continue_reroute of 'a * int<br>       | `None<br>       | `OK<br>       | `Reroute of int ]</code> </pre>
<div class="info ">
<div class="info-desc">
<p>Status of HTTP-level authentication:</p>
<ul>
<li><code class="code">`None</code>: Authentication wasn't tried.</li>
<li><code class="code">`OK</code>: The authentication protocol finished. What this means exactly
   depends on the protocol. For most protocols it just means that the
   server authenticated the client. For some protocols it may also mean
   that the client authenticated the server (mutual authentication).</li>
<li><code class="code">`Auth_error</code>: The authentication protocol did not succeed. Note that
   this state can also be reached for an otherwise successful HTTP
   response (i.e. code 200) when the client could not authenticate the
   server and the protocol demands this.</li>
<li><code class="code">`Reroute trans_id</code>: The request should be retried on a new connection
   for the transport identified by <code class="code">trans_id</code></li>
<li><code class="code">`Continue</code>: The authentication is still in progress. Normally the
   user should not see this state as the engine automatically continues
   the protocol. The argument of <code class="code">`Continue</code> is private.</li>
<li><code class="code">`Continue_reroute</code>: the combination of continue and reroute: the
   auth protocol continues, but the next request must be sent on the
   indicated transport.</li>
</ul>
</div>
</div>


<pre><code><span id="TYPEhow_to_reconnect"><span class="keyword">type</span> <code class="type">'message_class</code> how_to_reconnect</span> = </code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThow_to_reconnect.Send_again"><span class="constructor">Send_again</span></span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>Send the request automatically again</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThow_to_reconnect.Request_fails"><span class="constructor">Request_fails</span></span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>Drop the request</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThow_to_reconnect.Inquire"><span class="constructor">Inquire</span></span> <span class="keyword">of</span> <code class="type">('message_class -> bool)</code></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>If the function return <code class="code">true</code> send again, otherwise
 drop the request.</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThow_to_reconnect.Send_again_if_idem"><span class="constructor">Send_again_if_idem</span></span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>Default behaviour: <code class="code">Send_again</code> for idempotent 
 methods (GET, HEAD), <code class="code">Request_fails</code> for the rest</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>

<div class="info ">
<div class="info-desc">
<p>How to deal with automatic reconnections, especially when the
 connection crashes.</p>
</div>
</div>


<pre><code><span id="TYPEhow_to_redirect"><span class="keyword">type</span> <code class="type">'message_class</code> how_to_redirect</span> = </code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThow_to_redirect.Redirect"><span class="constructor">Redirect</span></span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>Perform the redirection</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThow_to_redirect.Do_not_redirect"><span class="constructor">Do_not_redirect</span></span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>No redirection</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThow_to_redirect.Redirect_inquire"><span class="constructor">Redirect_inquire</span></span> <span class="keyword">of</span> <code class="type">('message_class -> bool)</code></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>If the function return <code class="code">true</code> redirect, otherwise
 do not redirect. It is legal to set the <code class="code">Location</code>
 header as part of the action performed by the
 function. (Should be an absolute http URL.)</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThow_to_redirect.Redirect_if_idem"><span class="constructor">Redirect_if_idem</span></span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>Default behaviour: <code class="code">Redirect</code> for idempotent 
 methods (GET, HEAD), <code class="code">Do_not_redirect</code> for the rest</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>



<pre><span id="TYPEprivate_api"><span class="keyword">type</span> <code class="type"></code>private_api</span> </pre>
<div class="info ">
<div class="info-desc">
<p>The private part of the <code class="code">http_call</code> class type</p>
</div>
</div>


<pre><span id="TYPEresponse_body_storage"><span class="keyword">type</span> <code class="type"></code>response_body_storage</span> = <code class="type">[ `Body of unit -> <a href="Netmime.mime_body-c.html">Netmime.mime_body</a><br>       | `Device of unit -> <a href="Uq_io.html#TYPEout_device">Uq_io.out_device</a><br>       | `File of unit -> string<br>       | `Memory ]</code> </pre>
<div class="info ">
<div class="info-desc">
<p>How to create the response body:</p>
<ul>
<li><code class="code">`Memory</code>: The response body is in-memory</li>
<li><code class="code">`File f</code>: The response body is stored into the file whose name
   is returned by <code class="code">f()</code></li>
<li><code class="code">`Body f</code>: The response body is stored into the object returned
   by <code class="code">f()</code></li>
<li><code class="code">`Device f</code>: The response is directly forwarded to the device
   obtained by <code class="code">f()</code> (new since Ocamlnet-3.3)</li>
</ul>
<p>When the function <code class="code">f</code> is called in the latter cases the response
 header has already been received, and can be retrieved with the
 <code class="code">response_header</code> method of the call object. Also, <code class="code">response_status_text</code>,
 <code class="code">response_status_code</code>, and <code class="code">response_status</code> return meaningful
 values.</p>
</div>
</div>


<pre><code><span id="TYPEsynchronization"><span class="keyword">type</span> <code class="type"></code>synchronization</span> = </code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTsynchronization.Sync"><span class="constructor">Sync</span></span></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>The next request begins after the response of the last request has
 been received.</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code><span class="keyword">|</span></code></td>
<td align="left" valign="top" >
<code><span id="TYPEELTsynchronization.Pipeline"><span class="constructor">Pipeline</span></span> <span class="keyword">of</span> <code class="type">int</code></code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>The client is allowed to send several requests without waiting
 for responses. The number is the maximum number of unreplied
 requests that are allowed. A typical value: 5.
 If you increase this value, the risk becomes higher that requests
 must be repeatedly sent to the server in the case the connection
 crashes. Increasing is recommended if you send a bigger number of
 GET or HEAD requests to the server. Decreasing is recommended if you
 send large POST or PUT requests to the server.</p>

<p>Values &gt; 8 are interpreted as 8.</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>

<div class="info ">
<div class="info-desc">
<p>This type determines whether to keep requests and responses 
 synchronized or not.</p>

<p>The first request/response round is always done in
 Sync mode, because the protocol version of the other side
 is not known at that moment. <code class="code">Pipeline</code> requires HTTP/1.1.</p>

<p>In previous versions of netclient there was a third option,
 <code class="code">Sync_with_handshake_before_request_body</code>. This option is no
 longer necessary because the HTTP specification has been updated
 in the meantime, and there is a better mechanism now (the
 <code class="code">Expect</code> header is set).</p>
</div>
</div>


<pre><span id="TYPEresolver"><span class="keyword">type</span> <code class="type"></code>resolver</span> = <code class="type"><a href="Unixqueue.unix_event_system-c.html">Unixqueue.unix_event_system</a> -><br>       string -> (Unix.inet_addr option -> unit) -> unit</code> </pre>
<div class="info ">
<div class="info-desc">
<p>A name resolver is a function <code class="code">r</code> called as <code class="code">r esys name reply</code>.
 As <code class="code">name</code> the name to resolve is passed. The resolver must 
 finally call <code class="code">reply</code> with either the resolved address or
 with <code class="code">None</code>, indicating an error in the latter case.
 The event system <code class="code">esys</code> can be used to carry out the resolution
 process in an asynchronous way, but this is optional.</p>

<p>Only 1:1 resolution is supported, 1:n resolution not.</p>
</div>
</div>


<pre><span id="TYPEtransport_layer_id"><span class="keyword">type</span> <code class="type"></code>transport_layer_id</span> = <code class="type">int</code> </pre>
<div class="info ">
<div class="info-desc">
<p>The ID identifies a requirement for the transport
	channel, especially whether plain HTTP is sufficient, or HTTPS
	needs to be used, and if so, whether there are further requirements
	for the TLS context. There are the predefined IDs:</p>

<ul>
<li><a href="Nethttp_client.html#VALhttp_trans_id"><code class="code">Nethttp_client.http_trans_id</code></a> for HTTP connections</li>
<li><a href="Nethttp_client.html#VALhttps_trans_id"><code class="code">Nethttp_client.https_trans_id</code></a> for HTTPS connections without user
	  certificates</li>
<li><a href="Nethttp_client.html#VALproxy_only_trans_id"><code class="code">Nethttp_client.proxy_only_trans_id</code></a> for the restriction that this
	  protocol can only be used via a web proxy</li>
</ul>
</div>
</div>


<pre><code><span id="TYPEhttp_options"><span class="keyword">type</span> <code class="type"></code>http_options</span> = {</code></pre><table class="typetable">
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.synchronization">synchronization</span>&nbsp;: <code class="type"><a href="Nethttp_client.html#TYPEsynchronization">synchronization</a></code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>Default: <code class="code">Pipeline 5</code>.</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.maximum_connection_failures">maximum_connection_failures</span>&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>This option limits the number of connection attempts.
 Default: 2</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.maximum_message_errors">maximum_message_errors</span>&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>This option limits the number of protocol errors tolerated per
 request. If a request leads to a protocol error, the connection
 is shut down, the server is connected again, and the request is
 tried again (if the kind of the message allows retransmission).
 If a request repeatedly fails, this option limits the number
 of retransmissions.
 Default: 2</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.inhibit_persistency">inhibit_persistency</span>&nbsp;: <code class="type">bool</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>This option turns persistent connections off.
 Default: <code class="code">false</code>
 It is normally not necessary to change this option.</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.connection_timeout">connection_timeout</span>&nbsp;: <code class="type">float</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>If there is no network transmission for this period of time,
 the connection is shut down, and tried again.
 Default: 300.0 (seconds)
 It may be necessary to increase this value if HTTP is used for
 batch applications that contact extremely slow services.</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.number_of_parallel_connections">number_of_parallel_connections</span>&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>The client keeps up to this number of parallel connections to
 a single content server or proxy.
 Default: 2
 You may increase this value if you are mainly connected with
 an HTTP/1.0 proxy.</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.maximum_redirections">maximum_redirections</span>&nbsp;: <code class="type">int</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>The maximum number of redirections per message</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.handshake_timeout">handshake_timeout</span>&nbsp;: <code class="type">float</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>The timeout when waiting for "100 Continue". Default: 1.0</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.resolver">resolver</span>&nbsp;: <code class="type"><a href="Nethttp_client.html#TYPEresolver">resolver</a></code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>The function for name resolution</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.configure_socket">configure_socket</span>&nbsp;: <code class="type">Unix.file_descr -> unit</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>A function to configure socket options</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.tls">tls</span>&nbsp;: <code class="type"><a href="Netsys_crypto_types.html#TYPEtls_config">Netsys_crypto_types.tls_config</a> option</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>The TLS configuration to use by default for https URLs.
            (This can be overridden per request by using a different
             <code class="code">transport_layer_id</code>.)</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.schemes">schemes</span>&nbsp;: <code class="type">(string * <a href="Neturl.html#TYPEurl_syntax">Neturl.url_syntax</a> * int option * <a href="Nethttp_client.html#TYPEtransport_layer_id">transport_layer_id</a>)<br>       list</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>The list of supported URL schemes. The tuples mean
	    <code class="code">(scheme, syntax, default_port, cb)</code>. By default, the
	    schemes "http", "https", and "ipp" are supported.</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.verbose_status">verbose_status</span>&nbsp;: <code class="type">bool</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.verbose_request_header">verbose_request_header</span>&nbsp;: <code class="type">bool</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.verbose_response_header">verbose_response_header</span>&nbsp;: <code class="type">bool</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.verbose_request_contents">verbose_request_contents</span>&nbsp;: <code class="type">bool</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.verbose_response_contents">verbose_response_contents</span>&nbsp;: <code class="type">bool</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.verbose_connection">verbose_connection</span>&nbsp;: <code class="type">bool</code>;</code></td>

</tr>
<tr>
<td align="left" valign="top" >
<code>&nbsp;&nbsp;</code></td>
<td align="left" valign="top" >
<code><span id="TYPEELThttp_options.verbose_events">verbose_events</span>&nbsp;: <code class="type">bool</code>;</code></td>
<td class="typefieldcomment" align="left" valign="top" ><code>(*</code></td><td class="typefieldcomment" align="left" valign="top" ><div class="info ">
<div class="info-desc">
<p>Enable various debugging message types.</p>
<ul>
<li><code class="code">verbose_status</code>: reports about status of received documents</li>
<li><code class="code">verbose_request_header</code>: prints the header sent to the server</li>
<li><code class="code">verbose_request_contents</code>: prints the document sent to the server</li>
<li><code class="code">verbose_response_header</code>: prints the header of the answer from the server</li>
<li><code class="code">verbose_response_contents</code>: prints the document received from the server</li>
<li><code class="code">verbose_connection</code>: reports many connection events; authentication,
   too.</li>
<li><code class="code">verbose_events</code>: everything about the interaction with <code class="code">Unixqueue</code></li>
</ul>
<p>By default, <code class="code">verbose_status</code> and <code class="code">verbose_connection</code> are enabled.
 Note that you also have to set <code class="code">Debug.enable</code> to <code class="code">true</code> to see
 any log message at all!</p>
</div>
</div>
</td><td class="typefieldcomment" align="left" valign="bottom" ><code>*)</code></td>
</tr></table>
}

<div class="info ">
<div class="info-desc">
<p>Options for the whole pipeline. It is recommended to change options
 the following way:</p>
<pre class="codepre"><code class="code">    let opts = pipeline # get_options in
    let new_opts = { opts with &lt;field&gt; = &lt;value&gt;; ... } in
    pipeline # set_options new_opts
 </code></pre>
<p>New fields can be added anytime to this record, and this style
 of changing options is transparent to field additions.</p>
</div>
</div>


<pre><span id="TYPEheader_kind"><span class="keyword">type</span> <code class="type"></code>header_kind</span> = <code class="type">[ `Base | `Effective ]</code> </pre>
<div class="info ">
<div class="info-desc">
<p>The <code class="code">`Base</code> header is set by the user of <code class="code">http_call</code> and is never
 changed during processing the call. The <code class="code">`Effective</code> header is a copy
 of the base header at the time the request is sent. The effective header
 contains additions like <code class="code">Content-length</code> and authentication info.</p>
</div>
</div>


<pre><span id="TYPEhttp_call"><span class="keyword">class type</span> <a href="Nethttp_client.http_call-c.html">http_call</a></span> = <code class="code">object</code> <a href="Nethttp_client.http_call-c.html">..</a> <code class="code">end</code></pre><div class="info">
<p>The container for HTTP calls</p>

</div>

<pre><span id="TYPEtls_cache"><span class="keyword">class type</span> <a href="Nethttp_client.tls_cache-c.html">tls_cache</a></span> = <code class="code">object</code> <a href="Nethttp_client.tls_cache-c.html">..</a> <code class="code">end</code></pre><div class="info">
<p>A cache object for storing TLS session data</p>

</div>

<pre><span id="VALnull_tls_cache"><span class="keyword">val</span> null_tls_cache</span> : <code class="type">unit -> <a href="Nethttp_client.tls_cache-c.html">tls_cache</a></code></pre><div class="info ">
<div class="info-desc">
<p>This "cache" does not remember any session</p>
</div>
</div>

<pre><span id="VALunlim_tls_cache"><span class="keyword">val</span> unlim_tls_cache</span> : <code class="type">unit -> <a href="Nethttp_client.tls_cache-c.html">tls_cache</a></code></pre><div class="info ">
<div class="info-desc">
<p>Returns a simple cache without limit for the number of cached
      sessions</p>
</div>
</div>

<pre><span id="TYPEtransport_channel_type"><span class="keyword">class type</span> <a href="Nethttp_client.transport_channel_type-c.html">transport_channel_type</a></span> = <code class="code">object</code> <a href="Nethttp_client.transport_channel_type-c.html">..</a> <code class="code">end</code></pre><h2 id="1_HTTPmethods">HTTP methods</h2>
<pre><span id="TYPEgeneric_call"><span class="keyword">class</span> <span class="keyword">virtual</span> <a href="Nethttp_client.generic_call-c.html">generic_call</a></span> : <code class="type"></code><code class="code">object</code> <a href="Nethttp_client.generic_call-c.html">..</a> <code class="code">end</code></pre><div class="info">
<p>This class is an implementation of <code class="code">http_call</code>.</p>

</div>
<p>The following classes are implementations for the various HTTP
 methods. These classes do not initialize the call object.</p>

<pre><span id="TYPEget_call"><span class="keyword">class</span> <a href="Nethttp_client.get_call-c.html">get_call</a></span> : <code class="type"></code><code class="type"><a href="Nethttp_client.http_call-c.html">http_call</a></code></pre>
<pre><span id="TYPEtrace_call"><span class="keyword">class</span> <a href="Nethttp_client.trace_call-c.html">trace_call</a></span> : <code class="type"></code><code class="type"><a href="Nethttp_client.http_call-c.html">http_call</a></code></pre>
<pre><span id="TYPEoptions_call"><span class="keyword">class</span> <a href="Nethttp_client.options_call-c.html">options_call</a></span> : <code class="type"></code><code class="type"><a href="Nethttp_client.http_call-c.html">http_call</a></code></pre>
<pre><span id="TYPEhead_call"><span class="keyword">class</span> <a href="Nethttp_client.head_call-c.html">head_call</a></span> : <code class="type"></code><code class="type"><a href="Nethttp_client.http_call-c.html">http_call</a></code></pre>
<pre><span id="TYPEpost_call"><span class="keyword">class</span> <a href="Nethttp_client.post_call-c.html">post_call</a></span> : <code class="type"></code><code class="type"><a href="Nethttp_client.http_call-c.html">http_call</a></code></pre>
<pre><span id="TYPEput_call"><span class="keyword">class</span> <a href="Nethttp_client.put_call-c.html">put_call</a></span> : <code class="type"></code><code class="type"><a href="Nethttp_client.http_call-c.html">http_call</a></code></pre>
<pre><span id="TYPEdelete_call"><span class="keyword">class</span> <a href="Nethttp_client.delete_call-c.html">delete_call</a></span> : <code class="type"></code><code class="type"><a href="Nethttp_client.http_call-c.html">http_call</a></code></pre><p>The following classes initialize the request message of the
 call (header and body). 
 These classes are also backward compatible to the classes
 found in earlier versions of netclient.</p>

<pre><span id="TYPEget"><span class="keyword">class</span> <a href="Nethttp_client.get-c.html">get</a></span> : <code class="type">string -> </code><code class="type"><a href="Nethttp_client.http_call-c.html">http_call</a></code></pre><div class="info">
<p>Argument: URI</p>

</div>

<pre><span id="TYPEtrace"><span class="keyword">class</span> <a href="Nethttp_client.trace-c.html">trace</a></span> : <code class="type">string -> int -> </code><code class="type"><a href="Nethttp_client.http_call-c.html">http_call</a></code></pre><div class="info">
<p>Arguments: URI, maximum number of hops</p>

</div>

<pre><span id="TYPEoptions"><span class="keyword">class</span> <a href="Nethttp_client.options-c.html">options</a></span> : <code class="type">string -> </code><code class="type"><a href="Nethttp_client.http_call-c.html">http_call</a></code></pre><div class="info">
<p>Argument: URI or "*"</p>

</div>

<pre><span id="TYPEhead"><span class="keyword">class</span> <a href="Nethttp_client.head-c.html">head</a></span> : <code class="type">string -> </code><code class="type"><a href="Nethttp_client.http_call-c.html">http_call</a></code></pre><div class="info">
<p>Argument: URI</p>

</div>

<pre><span id="TYPEpost"><span class="keyword">class</span> <a href="Nethttp_client.post-c.html">post</a></span> : <code class="type">string -> (string * string) list -> </code><code class="type"><a href="Nethttp_client.http_call-c.html">http_call</a></code></pre><div class="info">
<p>Arguments: URI, parameter list to be transferred as
 application/x-www-form-urlencoded body</p>

</div>

<pre><span id="TYPEpost_raw"><span class="keyword">class</span> <a href="Nethttp_client.post_raw-c.html">post_raw</a></span> : <code class="type">string -> string -> </code><code class="type"><a href="Nethttp_client.http_call-c.html">http_call</a></code></pre><div class="info">
<p>Arguments: URI, body</p>

</div>

<pre><span id="TYPEput"><span class="keyword">class</span> <a href="Nethttp_client.put-c.html">put</a></span> : <code class="type">string -> string -> </code><code class="type"><a href="Nethttp_client.http_call-c.html">http_call</a></code></pre><div class="info">
<p>Arguments: URI, body</p>

</div>

<pre><span id="TYPEdelete"><span class="keyword">class</span> <a href="Nethttp_client.delete-c.html">delete</a></span> : <code class="type">string -> </code><code class="type"><a href="Nethttp_client.http_call-c.html">http_call</a></code></pre><div class="info">
<p>Argument: URI</p>

</div>
<h2 id="1_Authentication">Authentication</h2>
<pre><span id="TYPEkey"><span class="keyword">class type</span> <a href="Nethttp_client.key-c.html">key</a></span> = <code class="code">object</code> <a href="Nethttp_client.key-c.html">..</a> <code class="code">end</code></pre><div class="info">
<p>A <code class="code">key</code> is a user/password combination for a certain realm</p>

</div>

<pre><span id="VALkey"><span class="keyword">val</span> key</span> : <code class="type">user:string -><br>       password:string -><br>       realm:string -> domain:<a href="Neturl.html#TYPEurl">Neturl.url</a> list -> <a href="Nethttp_client.key-c.html">key</a></code></pre><div class="info ">
<div class="info-desc">
<p>Create a key object. <code class="code">user</code> and <code class="code">password</code> are encoded in UTF-8.</p>
</div>
</div>

<pre><span id="VALkey_creds"><span class="keyword">val</span> key_creds</span> : <code class="type">user:string -><br>       creds:(string * string * (string * string) list) list -><br>       <a href="Nethttp_client.html#TYPEhttp_options">http_options</a> -> <a href="Nethttp_client.key-c.html">key</a></code></pre><div class="info ">
<div class="info-desc">
<p>Create a key object from a list of credentials</p>
</div>
</div>

<pre><span id="TYPEkey_handler"><span class="keyword">class type</span> <a href="Nethttp_client.key_handler-c.html">key_handler</a></span> = <code class="code">object</code> <a href="Nethttp_client.key_handler-c.html">..</a> <code class="code">end</code></pre>
<pre><span id="TYPEkey_ring"><span class="keyword">class</span> <a href="Nethttp_client.key_ring-c.html">key_ring</a></span> : <code class="type">?uplink:#<a href="Nethttp_client.key_handler-c.html">key_handler</a> -> ?no_invalidation:bool -> unit -> </code><code class="code">object</code> <a href="Nethttp_client.key_ring-c.html">..</a> <code class="code">end</code></pre><div class="info">
<p>The <code class="code">key_ring</code> is a cache for keys.</p>

</div>

<pre><span id="TYPEauth_session"><span class="keyword">class type</span> <a href="Nethttp_client.auth_session-c.html">auth_session</a></span> = <code class="code">object</code> <a href="Nethttp_client.auth_session-c.html">..</a> <code class="code">end</code></pre><div class="info">
<p>An <code class="code">auth_session</code> represents an authenticated session</p>

</div>

<pre><span id="TYPEauth_handler"><span class="keyword">class type</span> <a href="Nethttp_client.auth_handler-c.html">auth_handler</a></span> = <code class="code">object</code> <a href="Nethttp_client.auth_handler-c.html">..</a> <code class="code">end</code></pre><div class="info">
<p>An authentication handler has the capability of adding the necessary
 headers to messages.</p>

</div>

<pre><span id="TYPEbasic_auth_handler"><span class="keyword">class</span> <a href="Nethttp_client.basic_auth_handler-c.html">basic_auth_handler</a></span> : <code class="type">?enable_reauth:bool -> ?skip_challenge:bool -> #<a href="Nethttp_client.key_handler-c.html">key_handler</a> -> </code><code class="type"><a href="Nethttp_client.auth_handler-c.html">auth_handler</a></code></pre><div class="info">
<p>Basic authentication.</p>

</div>

<pre><span id="TYPEdigest_auth_handler"><span class="keyword">class</span> <a href="Nethttp_client.digest_auth_handler-c.html">digest_auth_handler</a></span> : <code class="type">#<a href="Nethttp_client.key_handler-c.html">key_handler</a> -> </code><code class="type"><a href="Nethttp_client.auth_handler-c.html">auth_handler</a></code></pre><div class="info">
<p>Digest authentication.</p>

</div>

<pre><span id="TYPEunified_auth_handler"><span class="keyword">class</span> <a href="Nethttp_client.unified_auth_handler-c.html">unified_auth_handler</a></span> : <code class="type">?insecure:bool -> #<a href="Nethttp_client.key_handler-c.html">key_handler</a> -> </code><code class="type"><a href="Nethttp_client.auth_handler-c.html">auth_handler</a></code></pre><div class="info">
<p>Support both digest and basic authentication, with preference to
      digest.</p>

</div>

<pre><span id="TYPEgeneric_auth_handler"><span class="keyword">class</span> <a href="Nethttp_client.generic_auth_handler-c.html">generic_auth_handler</a></span> : <code class="type">#<a href="Nethttp_client.key_handler-c.html">key_handler</a> -> (module Nethttp.HTTP_CLIENT_MECHANISM) list -> </code><code class="type"><a href="Nethttp_client.auth_handler-c.html">auth_handler</a></code></pre><div class="info">
<p>Authenticate with the passed generic HTTP mechanisms</p>

</div>
<p>For the <code class="code">Negotiate</code> method (SPNEGO/GSSAPI), have a look at
    <a href="Netmech_spnego_http.html"><code class="code">Netmech_spnego_http</code></a>.</p>
<h2 id="1_Transport">Transport</h2><p>A connection cache is an object that keeps connections open that
 are currently unused. A connection cache can be shared by several
 pipelines.</p>

<pre><span id="TYPEconnection_cache"><span class="keyword">type</span> <code class="type"></code>connection_cache</span> = <code class="type"><a href="Nethttp_client_conncache.connection_cache-c.html">Nethttp_client_conncache.connection_cache</a></code> </pre>


<pre><span id="VALclose_connection_cache"><span class="keyword">val</span> close_connection_cache</span> : <code class="type"><a href="Nethttp_client.html#TYPEconnection_cache">connection_cache</a> -> unit</code></pre><div class="info ">
<div class="info-desc">
<p>Closes all descriptors known to the cache</p>
</div>
</div>

<pre><span id="VALcreate_restrictive_cache"><span class="keyword">val</span> create_restrictive_cache</span> : <code class="type">unit -> <a href="Nethttp_client.html#TYPEconnection_cache">connection_cache</a></code></pre><div class="info ">
<div class="info-desc">
<p>A restrictive cache closes connections as soon as there are no
 pending requests.</p>
</div>
</div>

<pre><span id="VALcreate_aggressive_cache"><span class="keyword">val</span> create_aggressive_cache</span> : <code class="type">unit -> <a href="Nethttp_client.html#TYPEconnection_cache">connection_cache</a></code></pre><div class="info ">
<div class="info-desc">
<p>This type of cache tries to keep connections as long open as
 possible. The consequence is that users are responsible for
 closing the descriptors (by calling <code class="code">close_connection_cache</code>) when the
 cache is no longer in use.</p>
</div>
</div>

<pre><span id="VALhttp_trans_id"><span class="keyword">val</span> http_trans_id</span> : <code class="type"><a href="Nethttp_client.html#TYPEtransport_layer_id">transport_layer_id</a></code></pre><div class="info ">
<div class="info-desc">
<p>Identifies the pure HTTP transport (without SSL), with or
      without web proxies</p>
</div>
</div>

<pre><span id="VALhttps_trans_id"><span class="keyword">val</span> https_trans_id</span> : <code class="type"><a href="Nethttp_client.html#TYPEtransport_layer_id">transport_layer_id</a></code></pre><div class="info ">
<div class="info-desc">
<p>Identifies anonymous HTTPS transport (i.e. no client
      certificates), with or without web proxies.</p>
</div>
</div>

<pre><span id="VALspnego_trans_id"><span class="keyword">val</span> spnego_trans_id</span> : <code class="type"><a href="Nethttp_client.html#TYPEtransport_layer_id">transport_layer_id</a></code></pre><div class="info ">
<div class="info-desc">
<p>Identifies an anonymous HTTPS transport that is additionally
      authenticated via SPNEGO (as described in RFC 4559)</p>
</div>
</div>

<pre><span id="VALproxy_only_trans_id"><span class="keyword">val</span> proxy_only_trans_id</span> : <code class="type"><a href="Nethttp_client.html#TYPEtransport_layer_id">transport_layer_id</a></code></pre><div class="info ">
<div class="info-desc">
<p>Identifies web proxy connections. Use this to
      e.g. send an FTP URL to a web proxy via HTTP</p>
</div>
</div>

<pre><span id="VALnew_trans_id"><span class="keyword">val</span> new_trans_id</span> : <code class="type">unit -> <a href="Nethttp_client.html#TYPEtransport_layer_id">transport_layer_id</a></code></pre><div class="info ">
<div class="info-desc">
<p>Allocates and returns a new ID</p>
</div>
</div>

<pre><span id="VALhttp_transport_channel_type"><span class="keyword">val</span> http_transport_channel_type</span> : <code class="type"><a href="Nethttp_client.transport_channel_type-c.html">transport_channel_type</a></code></pre><div class="info ">
<div class="info-desc">
<p>Transport via HTTP</p>
</div>
</div>

<pre><span id="VALhttps_transport_channel_type"><span class="keyword">val</span> https_transport_channel_type</span> : <code class="type"><a href="Netsys_crypto_types.html#TYPEtls_config">Netsys_crypto_types.tls_config</a> -> <a href="Nethttp_client.transport_channel_type-c.html">transport_channel_type</a></code></pre><div class="info ">
<div class="info-desc">
<p>Create a new transport for HTTPS and this configuration.
      As of OCamlnet-4, https is automatically enabled if 
      <a href="Netsys_crypto.html#VALcurrent_tls"><code class="code">Netsys_crypto.current_tls</code></a> returns something, i.e. if TLS
      is globally initialized, so there is often no reason to
      configure a special https transport with this function.
      You still need it if you want to enable special configurations
      per request:</p>

<pre class="codepre"><code class="code">        let my_trans_id = Nethttp_client.new_trans_id()
        let my_tct = Nethttp_client.https_transport_channel_type my_tls_config
        pipeline # configure_transport my_trans_id my_tct;
      </code></pre>
<p>Now you can enable this special configuration for a request object
      <code class="code">call</code>:</p>

<pre class="codepre"><code class="code">        call # set_transport_layer my_trans_id
      </code></pre>
<p>If you want to change the TLS configuration for the whole pipeline,
      just set the <code class="code">tls</code> field of <a href="Nethttp_client.html#TYPEhttp_options"><code class="code">Nethttp_client.http_options</code></a>.</p>
</div>
</div>

<pre><span id="TYPEproxy_type"><span class="keyword">type</span> <code class="type"></code>proxy_type</span> = <code class="type">[ `Http_proxy | `Socks5 ]</code> </pre>

<h2 id="1_Pipelines">Pipelines</h2>
<pre><span id="TYPEpipeline"><span class="keyword">class</span> <a href="Nethttp_client.pipeline-c.html">pipeline</a></span> : <code class="type"></code><code class="code">object</code> <a href="Nethttp_client.pipeline-c.html">..</a> <code class="code">end</code></pre><div class="info">
<p>A pipeline is a queue of HTTP calls to perform</p>

</div>
<p><b>Example using the pipeline:</b></p>

<pre class="codepre"><code class="code"> let call = new get "http://server/path" in
 let pipeline = new pipeline in
 pipeline # add call;
 pipeline # run();    (* Now the HTTP client is working... *)
 match call # status with
 | `Successful -&gt; ...
 | ...
 </code></pre><h3 id="2_Auxiliarypipelinefunctions">Auxiliary pipeline functions</h3>
<pre><span id="VALparse_proxy_setting"><span class="keyword">val</span> parse_proxy_setting</span> : <code class="type">insecure:bool -> string -> string * int * (string * string * bool) option</code></pre><div class="info ">
<div class="info-desc">
<p>Parses the value of an environment variable like <code class="code">http_proxy</code>,
      i.e. an HTTP URL. The argument is the URL.
      Returns <code class="code">(host,port,auth)</code> where <code class="code">auth</code> may include user name,
      password, and the <code class="code">insecure</code> flag.</p>
</div>
</div>

<pre><span id="VALparse_no_proxy"><span class="keyword">val</span> parse_no_proxy</span> : <code class="type">string -> string list</code></pre><div class="info ">
<div class="info-desc">
<p>Parses the value of an environment variable like <code class="code">no_proxy</code>. Returns
      the list of domains.</p>
</div>
</div>
<h2 id="1_Conveniencemoduleforsimpleapplications">Convenience module for simple applications</h2><p>Do <code class="code">open Nethttp_client.Convenience</code> for simple applications.</p>

<pre><span id="MODULEConvenience"><span class="keyword">module</span> <a href="Nethttp_client.Convenience.html">Convenience</a></span>: <code class="code">sig</code> <a href="Nethttp_client.Convenience.html">..</a> <code class="code">end</code></pre><h2 id="1_Debugging">Debugging</h2>
<pre><span id="MODULEDebug"><span class="keyword">module</span> <a href="Nethttp_client.Debug.html">Debug</a></span>: <code class="code">sig</code> <a href="Nethttp_client.Debug.html">..</a> <code class="code">end</code></pre></body></html>