@@ -135,7 +135,7 @@ fn main() {
135
135
easy.get(true).unwrap();
136
136
137
137
let mut list = List::new();
138
- list.append("User-Agent: Test Agent");
138
+ list.append("User-Agent: Test Agent").unwrap() ;
139
139
easy.http_headers(list).unwrap();
140
140
141
141
{
@@ -169,7 +169,7 @@ fn main() {
169
169
easy.get(true).unwrap();
170
170
171
171
let mut list = List::new();
172
- list.append("User-Agent: Test Agent");
172
+ list.append("User-Agent: Test Agent").unwrap() ;
173
173
easy.http_headers(list).unwrap();
174
174
175
175
{
@@ -232,7 +232,7 @@ fn main() {
232
232
easy.get(true).unwrap();
233
233
234
234
let mut list = List::new();
235
- list.append("User-Agent: Test Agent");
235
+ list.append("User-Agent: Test Agent").unwrap() ;
236
236
easy.http_headers(list).unwrap();
237
237
238
238
{
@@ -295,7 +295,7 @@ fn main() {
295
295
easy.get(true).unwrap();
296
296
297
297
let mut list = List::new();
298
- list.append("User-Agent: Test Agent");
298
+ list.append("User-Agent: Test Agent").unwrap() ;
299
299
easy.http_headers(list).unwrap();
300
300
301
301
{
@@ -329,7 +329,7 @@ fn main() {
329
329
easy.get(true).unwrap();
330
330
331
331
let mut list = List::new();
332
- list.append("User-Agent: Test Agent");
332
+ list.append("User-Agent: Test Agent").unwrap() ;
333
333
easy.http_headers(list).unwrap();
334
334
335
335
{
@@ -354,7 +354,6 @@ fn main() {
354
354
test ('GET12' , () {
355
355
const expectedCode = r"""
356
356
use curl::easy::Easy;
357
- use curl::easy::List;
358
357
359
358
fn main() {
360
359
let mut easy = Easy::new();
@@ -461,7 +460,7 @@ fn main() {
461
460
}"#.as_bytes()).unwrap();
462
461
463
462
let mut list = List::new();
464
- list.append("Content-Type: text/plain");
463
+ list.append("Content-Type: text/plain").unwrap() ;
465
464
easy.http_headers(list).unwrap();
466
465
467
466
{
@@ -505,7 +504,7 @@ fn main() {
505
504
}).to_string().as_bytes()).unwrap();
506
505
507
506
let mut list = List::new();
508
- list.append("Content-Type: application/json");
507
+ list.append("Content-Type: application/json").unwrap() ;
509
508
easy.http_headers(list).unwrap();
510
509
511
510
{
@@ -544,8 +543,8 @@ fn main() {
544
543
}).to_string().as_bytes()).unwrap();
545
544
546
545
let mut list = List::new();
547
- list.append("User-Agent: Test Agent");
548
- list.append("Content-Type: application/json");
546
+ list.append("User-Agent: Test Agent").unwrap() ;
547
+ list.append("Content-Type: application/json").unwrap() ;
549
548
easy.http_headers(list).unwrap();
550
549
551
550
{
@@ -582,17 +581,17 @@ fn main() {
582
581
583
582
form.part("text")
584
583
.contents(b"API")
585
- .add();
584
+ .add().unwrap() ;
586
585
587
586
form.part("sep")
588
587
.contents(b"|")
589
- .add();
588
+ .add().unwrap() ;
590
589
591
590
form.part("times")
592
591
.contents(b"3")
593
- .add();
592
+ .add().unwrap() ;
594
593
595
- easy.httppost(form);
594
+ easy.httppost(form).unwrap() ;
596
595
{
597
596
let mut transfer = easy.transfer();
598
597
transfer.write_function(|new_data| {
@@ -627,19 +626,19 @@ fn main() {
627
626
628
627
form.part("text")
629
628
.contents(b"API")
630
- .add();
629
+ .add().unwrap() ;
631
630
632
631
form.part("sep")
633
632
.contents(b"|")
634
- .add();
633
+ .add().unwrap() ;
635
634
636
635
form.part("times")
637
636
.contents(b"3")
638
- .add();
637
+ .add().unwrap() ;
639
638
640
- easy.httppost(form);
639
+ easy.httppost(form).unwrap() ;
641
640
let mut list = List::new();
642
- list.append("User-Agent: Test Agent");
641
+ list.append("User-Agent: Test Agent").unwrap() ;
643
642
easy.http_headers(list).unwrap();
644
643
645
644
{
@@ -676,13 +675,13 @@ fn main() {
676
675
677
676
form.part("token")
678
677
.contents(b"xyz")
679
- .add();
678
+ .add().unwrap() ;
680
679
681
680
form.part("imfile")
682
681
.file("/Documents/up/1.png")
683
- .add();
682
+ .add().unwrap() ;
684
683
685
- easy.httppost(form);
684
+ easy.httppost(form).unwrap() ;
686
685
{
687
686
let mut transfer = easy.transfer();
688
687
transfer.write_function(|new_data| {
@@ -717,13 +716,13 @@ fn main() {
717
716
718
717
form.part("token")
719
718
.contents(b"xyz")
720
- .add();
719
+ .add().unwrap() ;
721
720
722
721
form.part("imfile")
723
722
.file("/Documents/up/1.png")
724
- .add();
723
+ .add().unwrap() ;
725
724
726
- easy.httppost(form);
725
+ easy.httppost(form).unwrap() ;
727
726
{
728
727
let mut transfer = easy.transfer();
729
728
transfer.write_function(|new_data| {
@@ -758,17 +757,17 @@ fn main() {
758
757
759
758
form.part("text")
760
759
.contents(b"API")
761
- .add();
760
+ .add().unwrap() ;
762
761
763
762
form.part("sep")
764
763
.contents(b"|")
765
- .add();
764
+ .add().unwrap() ;
766
765
767
766
form.part("times")
768
767
.contents(b"3")
769
- .add();
768
+ .add().unwrap() ;
770
769
771
- easy.httppost(form);
770
+ easy.httppost(form).unwrap() ;
772
771
{
773
772
let mut transfer = easy.transfer();
774
773
transfer.write_function(|new_data| {
@@ -803,16 +802,16 @@ fn main() {
803
802
804
803
form.part("token")
805
804
.contents(b"xyz")
806
- .add();
805
+ .add().unwrap() ;
807
806
808
807
form.part("imfile")
809
808
.file("/Documents/up/1.png")
810
- .add();
809
+ .add().unwrap() ;
811
810
812
- easy.httppost(form);
811
+ easy.httppost(form).unwrap() ;
813
812
let mut list = List::new();
814
- list.append("User-Agent: Test Agent");
815
- list.append("Keep-Alive: true");
813
+ list.append("User-Agent: Test Agent").unwrap() ;
814
+ list.append("Keep-Alive: true").unwrap() ;
816
815
easy.http_headers(list).unwrap();
817
816
818
817
{
@@ -855,7 +854,7 @@ fn main() {
855
854
}).to_string().as_bytes()).unwrap();
856
855
857
856
let mut list = List::new();
858
- list.append("Content-Type: application/json");
857
+ list.append("Content-Type: application/json").unwrap() ;
859
858
easy.http_headers(list).unwrap();
860
859
861
860
{
@@ -898,7 +897,7 @@ fn main() {
898
897
}).to_string().as_bytes()).unwrap();
899
898
900
899
let mut list = List::new();
901
- list.append("Content-Type: application/json");
900
+ list.append("Content-Type: application/json").unwrap() ;
902
901
easy.http_headers(list).unwrap();
903
902
904
903
{
@@ -970,7 +969,7 @@ fn main() {
970
969
}).to_string().as_bytes()).unwrap();
971
970
972
971
let mut list = List::new();
973
- list.append("Content-Type: application/json");
972
+ list.append("Content-Type: application/json").unwrap() ;
974
973
easy.http_headers(list).unwrap();
975
974
976
975
{
0 commit comments