forked from nativescript-community/https
-
Notifications
You must be signed in to change notification settings - Fork 0
/
com.squareup.okhttp3.d.ts
3050 lines (2924 loc) · 127 KB
/
com.squareup.okhttp3.d.ts
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
declare module okhttp3 {
export class Address extends java.lang.Object {
public proxy(): java.net.Proxy;
public proxySelector(): java.net.ProxySelector;
public sslSocketFactory(): javax.net.ssl.SSLSocketFactory;
public protocols(): java.util.List<any>;
public url(): okhttp3.HttpUrl;
public certificatePinner(): okhttp3.CertificatePinner;
public constructor(param0: string, param1: number, param2: okhttp3.Dns, param3: javax.net.SocketFactory, param4: javax.net.ssl.SSLSocketFactory, param5: javax.net.ssl.HostnameVerifier, param6: okhttp3.CertificatePinner, param7: okhttp3.Authenticator, param8: java.net.Proxy, param9: java.util.List<any>, param10: java.util.List<any>, param11: java.net.ProxySelector);
public socketFactory(): javax.net.SocketFactory;
public dns(): okhttp3.Dns;
public proxyAuthenticator(): okhttp3.Authenticator;
public hostnameVerifier(): javax.net.ssl.HostnameVerifier;
public hashCode(): number;
public connectionSpecs(): java.util.List<any>;
public equals(param0: java.lang.Object): boolean;
}
}
declare module okhttp3 {
export class Authenticator extends java.lang.Object {
/**
* Constructs a new instance of the okhttp3.Authenticator interface with the provided implementation.
*/
public constructor(implementation: {
authenticate(param0: okhttp3.Route, param1: okhttp3.Response): okhttp3.Request;
<clinit>(): void;
});
public static NONE: okhttp3.Authenticator;
public authenticate(param0: okhttp3.Route, param1: okhttp3.Response): okhttp3.Request;
}
}
declare module okhttp3 {
export class Cache extends java.lang.Object implements java.io.Closeable, java.io.Flushable {
public close(): void;
public directory(): java.io.File;
public constructor(param0: java.io.File, param1: number);
public static key(param0: okhttp3.HttpUrl): string;
public writeAbortCount(): number;
public evictAll(): void;
public delete(): void;
public isClosed(): boolean;
public urls(): java.util.Iterator;
public networkCount(): number;
public requestCount(): number;
public flush(): void;
public initialize(): void;
public size(): number;
public writeSuccessCount(): number;
public hitCount(): number;
public maxSize(): number;
}
export module Cache {
export class CacheRequestImpl extends java.lang.Object implements okhttp3.internal.cache.CacheRequest {
public body(): okio.Sink;
public abort(): void;
public constructor(param0: okhttp3.Cache, param1: okhttp3.internal.cache.DiskLruCache.Editor);
}
export class CacheResponseBody extends okhttp3.ResponseBody {
public contentLength(): number;
public source(): okio.BufferedSource;
public contentType(): okhttp3.MediaType;
public constructor();
public close(): void;
public constructor(param0: okhttp3.internal.cache.DiskLruCache.Snapshot, param1: string, param2: string);
}
export class Entry extends java.lang.Object {
public matches(param0: okhttp3.Request, param1: okhttp3.Response): boolean;
public constructor(param0: okhttp3.Response);
public constructor(param0: okio.Source);
public response(param0: okhttp3.internal.cache.DiskLruCache.Snapshot): okhttp3.Response;
public writeTo(param0: okhttp3.internal.cache.DiskLruCache.Editor): void;
}
}
}
declare module okhttp3 {
export class CacheControl extends java.lang.Object {
public static FORCE_NETWORK: okhttp3.CacheControl;
public static FORCE_CACHE: okhttp3.CacheControl;
public maxStaleSeconds(): number;
public mustRevalidate(): boolean;
public static parse(param0: okhttp3.Headers): okhttp3.CacheControl;
public toString(): string;
public minFreshSeconds(): number;
public onlyIfCached(): boolean;
public noCache(): boolean;
public noTransform(): boolean;
public isPrivate(): boolean;
public sMaxAgeSeconds(): number;
public noStore(): boolean;
public maxAgeSeconds(): number;
public isPublic(): boolean;
}
export module CacheControl {
export class Builder extends java.lang.Object {
public noCache(): okhttp3.CacheControl.Builder;
public maxStale(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.CacheControl.Builder;
public onlyIfCached(): okhttp3.CacheControl.Builder;
public minFresh(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.CacheControl.Builder;
public maxAge(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.CacheControl.Builder;
public constructor();
public build(): okhttp3.CacheControl;
public noStore(): okhttp3.CacheControl.Builder;
public noTransform(): okhttp3.CacheControl.Builder;
}
}
}
declare module okhttp3 {
export class Call extends java.lang.Object implements java.lang.Cloneable {
/**
* Constructs a new instance of the okhttp3.Call interface with the provided implementation.
*/
public constructor(implementation: {
request(): okhttp3.Request;
execute(): okhttp3.Response;
enqueue(param0: okhttp3.Callback): void;
cancel(): void;
isExecuted(): boolean;
isCanceled(): boolean;
clone(): okhttp3.Call;
});
public isExecuted(): boolean;
public clone(): okhttp3.Call;
public request(): okhttp3.Request;
public execute(): okhttp3.Response;
public isCanceled(): boolean;
public clone(): java.lang.Object;
public enqueue(param0: okhttp3.Callback): void;
public cancel(): void;
}
export module Call {
export class Factory extends java.lang.Object {
/**
* Constructs a new instance of the okhttp3.Call$Factory interface with the provided implementation.
*/
public constructor(implementation: {
newCall(param0: okhttp3.Request): okhttp3.Call;
});
public newCall(param0: okhttp3.Request): okhttp3.Call;
}
}
}
declare module okhttp3 {
export class Callback extends java.lang.Object {
/**
* Constructs a new instance of the okhttp3.Callback interface with the provided implementation.
*/
public constructor(implementation: {
onFailure(param0: okhttp3.Call, param1: java.io.IOException): void;
onResponse(param0: okhttp3.Call, param1: okhttp3.Response): void;
});
public onResponse(param0: okhttp3.Call, param1: okhttp3.Response): void;
public onFailure(param0: okhttp3.Call, param1: java.io.IOException): void;
}
}
declare module okhttp3 {
export class CertificatePinner extends java.lang.Object {
public static DEFAULT: okhttp3.CertificatePinner;
public static pin(param0: java.security.cert.Certificate): string;
public check(param0: string, param1: native.Array<java.security.cert.Certificate>): void;
public hashCode(): number;
public check(param0: string, param1: java.util.List<any>): void;
public equals(param0: java.lang.Object): boolean;
}
export module CertificatePinner {
export class Builder extends java.lang.Object {
public build(): okhttp3.CertificatePinner;
public add(param0: string, param1: native.Array<string>): okhttp3.CertificatePinner.Builder;
public constructor();
}
export class Pin extends java.lang.Object {
public toString(): string;
public equals(param0: java.lang.Object): boolean;
public hashCode(): number;
}
}
}
declare module okhttp3 {
export class Challenge extends java.lang.Object {
public scheme(): string;
public hashCode(): number;
public toString(): string;
public equals(param0: java.lang.Object): boolean;
public constructor(param0: string, param1: string);
public realm(): string;
}
}
declare module okhttp3 {
export class CipherSuite extends java.lang.Object {
public static TLS_RSA_WITH_NULL_MD5: okhttp3.CipherSuite;
public static TLS_RSA_WITH_NULL_SHA: okhttp3.CipherSuite;
public static TLS_RSA_EXPORT_WITH_RC4_40_MD5: okhttp3.CipherSuite;
public static TLS_RSA_WITH_RC4_128_MD5: okhttp3.CipherSuite;
public static TLS_RSA_WITH_RC4_128_SHA: okhttp3.CipherSuite;
public static TLS_RSA_EXPORT_WITH_DES40_CBC_SHA: okhttp3.CipherSuite;
public static TLS_RSA_WITH_DES_CBC_SHA: okhttp3.CipherSuite;
public static TLS_RSA_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DHE_DSS_WITH_DES_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DHE_RSA_WITH_DES_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DH_anon_EXPORT_WITH_RC4_40_MD5: okhttp3.CipherSuite;
public static TLS_DH_anon_WITH_RC4_128_MD5: okhttp3.CipherSuite;
public static TLS_DH_anon_EXPORT_WITH_DES40_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DH_anon_WITH_DES_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DH_anon_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
public static TLS_KRB5_WITH_DES_CBC_SHA: okhttp3.CipherSuite;
public static TLS_KRB5_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
public static TLS_KRB5_WITH_RC4_128_SHA: okhttp3.CipherSuite;
public static TLS_KRB5_WITH_DES_CBC_MD5: okhttp3.CipherSuite;
public static TLS_KRB5_WITH_3DES_EDE_CBC_MD5: okhttp3.CipherSuite;
public static TLS_KRB5_WITH_RC4_128_MD5: okhttp3.CipherSuite;
public static TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA: okhttp3.CipherSuite;
public static TLS_KRB5_EXPORT_WITH_RC4_40_SHA: okhttp3.CipherSuite;
public static TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5: okhttp3.CipherSuite;
public static TLS_KRB5_EXPORT_WITH_RC4_40_MD5: okhttp3.CipherSuite;
public static TLS_RSA_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DHE_DSS_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DHE_RSA_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DH_anon_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
public static TLS_RSA_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DHE_DSS_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DHE_RSA_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DH_anon_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
public static TLS_RSA_WITH_NULL_SHA256: okhttp3.CipherSuite;
public static TLS_RSA_WITH_AES_128_CBC_SHA256: okhttp3.CipherSuite;
public static TLS_RSA_WITH_AES_256_CBC_SHA256: okhttp3.CipherSuite;
public static TLS_DHE_DSS_WITH_AES_128_CBC_SHA256: okhttp3.CipherSuite;
public static TLS_RSA_WITH_CAMELLIA_128_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DHE_DSS_WITH_CAMELLIA_128_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DHE_RSA_WITH_CAMELLIA_128_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DHE_RSA_WITH_AES_128_CBC_SHA256: okhttp3.CipherSuite;
public static TLS_DHE_DSS_WITH_AES_256_CBC_SHA256: okhttp3.CipherSuite;
public static TLS_DHE_RSA_WITH_AES_256_CBC_SHA256: okhttp3.CipherSuite;
public static TLS_DH_anon_WITH_AES_128_CBC_SHA256: okhttp3.CipherSuite;
public static TLS_DH_anon_WITH_AES_256_CBC_SHA256: okhttp3.CipherSuite;
public static TLS_RSA_WITH_CAMELLIA_256_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DHE_DSS_WITH_CAMELLIA_256_CBC_SHA: okhttp3.CipherSuite;
public static TLS_DHE_RSA_WITH_CAMELLIA_256_CBC_SHA: okhttp3.CipherSuite;
public static TLS_PSK_WITH_RC4_128_SHA: okhttp3.CipherSuite;
public static TLS_PSK_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
public static TLS_PSK_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
public static TLS_PSK_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
public static TLS_RSA_WITH_SEED_CBC_SHA: okhttp3.CipherSuite;
public static TLS_RSA_WITH_AES_128_GCM_SHA256: okhttp3.CipherSuite;
public static TLS_RSA_WITH_AES_256_GCM_SHA384: okhttp3.CipherSuite;
public static TLS_DHE_RSA_WITH_AES_128_GCM_SHA256: okhttp3.CipherSuite;
public static TLS_DHE_RSA_WITH_AES_256_GCM_SHA384: okhttp3.CipherSuite;
public static TLS_DHE_DSS_WITH_AES_128_GCM_SHA256: okhttp3.CipherSuite;
public static TLS_DHE_DSS_WITH_AES_256_GCM_SHA384: okhttp3.CipherSuite;
public static TLS_DH_anon_WITH_AES_128_GCM_SHA256: okhttp3.CipherSuite;
public static TLS_DH_anon_WITH_AES_256_GCM_SHA384: okhttp3.CipherSuite;
public static TLS_EMPTY_RENEGOTIATION_INFO_SCSV: okhttp3.CipherSuite;
public static TLS_FALLBACK_SCSV: okhttp3.CipherSuite;
public static TLS_ECDH_ECDSA_WITH_NULL_SHA: okhttp3.CipherSuite;
public static TLS_ECDH_ECDSA_WITH_RC4_128_SHA: okhttp3.CipherSuite;
public static TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
public static TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
public static TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
public static TLS_ECDHE_ECDSA_WITH_NULL_SHA: okhttp3.CipherSuite;
public static TLS_ECDHE_ECDSA_WITH_RC4_128_SHA: okhttp3.CipherSuite;
public static TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
public static TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
public static TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
public static TLS_ECDH_RSA_WITH_NULL_SHA: okhttp3.CipherSuite;
public static TLS_ECDH_RSA_WITH_RC4_128_SHA: okhttp3.CipherSuite;
public static TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
public static TLS_ECDH_RSA_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
public static TLS_ECDH_RSA_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
public static TLS_ECDHE_RSA_WITH_NULL_SHA: okhttp3.CipherSuite;
public static TLS_ECDHE_RSA_WITH_RC4_128_SHA: okhttp3.CipherSuite;
public static TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
public static TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
public static TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
public static TLS_ECDH_anon_WITH_NULL_SHA: okhttp3.CipherSuite;
public static TLS_ECDH_anon_WITH_RC4_128_SHA: okhttp3.CipherSuite;
public static TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA: okhttp3.CipherSuite;
public static TLS_ECDH_anon_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
public static TLS_ECDH_anon_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
public static TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256: okhttp3.CipherSuite;
public static TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384: okhttp3.CipherSuite;
public static TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256: okhttp3.CipherSuite;
public static TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384: okhttp3.CipherSuite;
public static TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256: okhttp3.CipherSuite;
public static TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384: okhttp3.CipherSuite;
public static TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256: okhttp3.CipherSuite;
public static TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384: okhttp3.CipherSuite;
public static TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256: okhttp3.CipherSuite;
public static TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384: okhttp3.CipherSuite;
public static TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256: okhttp3.CipherSuite;
public static TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384: okhttp3.CipherSuite;
public static TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256: okhttp3.CipherSuite;
public static TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384: okhttp3.CipherSuite;
public static TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256: okhttp3.CipherSuite;
public static TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384: okhttp3.CipherSuite;
public static TLS_ECDHE_PSK_WITH_AES_128_CBC_SHA: okhttp3.CipherSuite;
public static TLS_ECDHE_PSK_WITH_AES_256_CBC_SHA: okhttp3.CipherSuite;
public static TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256: okhttp3.CipherSuite;
public static TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256: okhttp3.CipherSuite;
public javaName(): string;
public static forJavaName(param0: string): okhttp3.CipherSuite;
public toString(): string;
}
}
declare module okhttp3 {
export class Connection extends java.lang.Object {
/**
* Constructs a new instance of the okhttp3.Connection interface with the provided implementation.
*/
public constructor(implementation: {
route(): okhttp3.Route;
socket(): java.net.Socket;
handshake(): okhttp3.Handshake;
protocol(): okhttp3.Protocol;
});
public route(): okhttp3.Route;
public protocol(): okhttp3.Protocol;
public handshake(): okhttp3.Handshake;
public socket(): java.net.Socket;
}
}
declare module okhttp3 {
export class ConnectionPool extends java.lang.Object {
public constructor();
public connectionCount(): number;
public evictAll(): void;
public idleConnectionCount(): number;
public constructor(param0: number, param1: number, param2: java.util.concurrent.TimeUnit);
}
}
declare module okhttp3 {
export class ConnectionSpec extends java.lang.Object {
public static MODERN_TLS: okhttp3.ConnectionSpec;
public static COMPATIBLE_TLS: okhttp3.ConnectionSpec;
public static CLEARTEXT: okhttp3.ConnectionSpec;
public cipherSuites(): java.util.List<any>;
public supportsTlsExtensions(): boolean;
public hashCode(): number;
public isCompatible(param0: javax.net.ssl.SSLSocket): boolean;
public isTls(): boolean;
public toString(): string;
public tlsVersions(): java.util.List<any>;
public equals(param0: java.lang.Object): boolean;
}
export module ConnectionSpec {
export class Builder extends java.lang.Object {
public tlsVersions(param0: native.Array<string>): okhttp3.ConnectionSpec.Builder;
public cipherSuites(param0: native.Array<string>): okhttp3.ConnectionSpec.Builder;
public build(): okhttp3.ConnectionSpec;
public constructor(param0: okhttp3.ConnectionSpec);
public cipherSuites(param0: native.Array<okhttp3.CipherSuite>): okhttp3.ConnectionSpec.Builder;
public supportsTlsExtensions(param0: boolean): okhttp3.ConnectionSpec.Builder;
public allEnabledCipherSuites(): okhttp3.ConnectionSpec.Builder;
public tlsVersions(param0: native.Array<okhttp3.TlsVersion>): okhttp3.ConnectionSpec.Builder;
public allEnabledTlsVersions(): okhttp3.ConnectionSpec.Builder;
}
}
}
declare module okhttp3 {
export class Cookie extends java.lang.Object {
public domain(): string;
public matches(param0: okhttp3.HttpUrl): boolean;
public static parseAll(param0: okhttp3.HttpUrl, param1: okhttp3.Headers): java.util.List<any>;
public toString(): string;
public persistent(): boolean;
public httpOnly(): boolean;
public static parse(param0: okhttp3.HttpUrl, param1: string): okhttp3.Cookie;
public hostOnly(): boolean;
public expiresAt(): number;
public hashCode(): number;
public name(): string;
public path(): string;
public secure(): boolean;
public value(): string;
public equals(param0: java.lang.Object): boolean;
}
export module Cookie {
export class Builder extends java.lang.Object {
public domain(param0: string): okhttp3.Cookie.Builder;
public hostOnlyDomain(param0: string): okhttp3.Cookie.Builder;
public value(param0: string): okhttp3.Cookie.Builder;
public httpOnly(): okhttp3.Cookie.Builder;
public secure(): okhttp3.Cookie.Builder;
public expiresAt(param0: number): okhttp3.Cookie.Builder;
public build(): okhttp3.Cookie;
public name(param0: string): okhttp3.Cookie.Builder;
public constructor();
public path(param0: string): okhttp3.Cookie.Builder;
}
}
}
declare module okhttp3 {
export class CookieJar extends java.lang.Object {
/**
* Constructs a new instance of the okhttp3.CookieJar interface with the provided implementation.
*/
public constructor(implementation: {
saveFromResponse(param0: okhttp3.HttpUrl, param1: java.util.List<any>): void;
loadForRequest(param0: okhttp3.HttpUrl): java.util.List<any>;
<clinit>(): void;
});
public static NO_COOKIES: okhttp3.CookieJar;
public loadForRequest(param0: okhttp3.HttpUrl): java.util.List<any>;
public saveFromResponse(param0: okhttp3.HttpUrl, param1: java.util.List<any>): void;
}
}
declare module okhttp3 {
export class Credentials extends java.lang.Object {
public static basic(param0: string, param1: string): string;
}
}
declare module okhttp3 {
export class Dispatcher extends java.lang.Object {
public constructor();
public setMaxRequestsPerHost(param0: number): void;
public constructor(param0: java.util.concurrent.ExecutorService);
public queuedCallsCount(): number;
public runningCallsCount(): number;
public queuedCalls(): java.util.List<any>;
public cancelAll(): void;
public runningCalls(): java.util.List<any>;
public setMaxRequests(param0: number): void;
public getMaxRequestsPerHost(): number;
public executorService(): java.util.concurrent.ExecutorService;
public setIdleCallback(param0: java.lang.Runnable): void;
public getMaxRequests(): number;
}
}
declare module okhttp3 {
export class Dns extends java.lang.Object {
/**
* Constructs a new instance of the okhttp3.Dns interface with the provided implementation.
*/
public constructor(implementation: {
lookup(param0: string): java.util.List<any>;
<clinit>(): void;
});
public static SYSTEM: okhttp3.Dns;
public lookup(param0: string): java.util.List<any>;
}
}
declare module okhttp3 {
export class FormBody extends okhttp3.RequestBody {
public value(param0: number): string;
public encodedValue(param0: number): string;
public name(param0: number): string;
public size(): number;
public encodedName(param0: number): string;
public contentType(): okhttp3.MediaType;
public writeTo(param0: okio.BufferedSink): void;
public contentLength(): number;
}
export module FormBody {
export class Builder extends java.lang.Object {
public addEncoded(param0: string, param1: string): okhttp3.FormBody.Builder;
public constructor();
public add(param0: string, param1: string): okhttp3.FormBody.Builder;
public build(): okhttp3.FormBody;
}
}
}
declare module okhttp3 {
export class Handshake extends java.lang.Object {
public static get(param0: javax.net.ssl.SSLSession): okhttp3.Handshake;
public peerCertificates(): java.util.List<any>;
public localCertificates(): java.util.List<any>;
public hashCode(): number;
public localPrincipal(): java.security.Principal;
public tlsVersion(): okhttp3.TlsVersion;
public peerPrincipal(): java.security.Principal;
public equals(param0: java.lang.Object): boolean;
public static get(param0: okhttp3.TlsVersion, param1: okhttp3.CipherSuite, param2: java.util.List<any>, param3: java.util.List<any>): okhttp3.Handshake;
public cipherSuite(): okhttp3.CipherSuite;
}
}
declare module okhttp3 {
export class Headers extends java.lang.Object {
public value(param0: number): string;
public names(): java.util.Set;
public newBuilder(): okhttp3.Headers.Builder;
public static of(param0: java.util.Map): okhttp3.Headers;
public toMultimap(): java.util.Map;
public toString(): string;
public get(param0: string): string;
public name(param0: number): string;
public values(param0: string): java.util.List<any>;
public size(): number;
public hashCode(): number;
public getDate(param0: string): java.util.Date;
public static of(param0: native.Array<string>): okhttp3.Headers;
public equals(param0: java.lang.Object): boolean;
}
export module Headers {
export class Builder extends java.lang.Object {
public get(param0: string): string;
public build(): okhttp3.Headers;
public add(param0: string, param1: string): okhttp3.Headers.Builder;
public removeAll(param0: string): okhttp3.Headers.Builder;
public set(param0: string, param1: string): okhttp3.Headers.Builder;
public constructor();
public add(param0: string): okhttp3.Headers.Builder;
}
}
}
declare module okhttp3 {
export class HttpUrl extends java.lang.Object {
public static get(param0: java.net.URI): okhttp3.HttpUrl;
public queryParameterNames(): java.util.Set;
public queryParameterName(param0: number): string;
public static defaultPort(param0: string): number;
public scheme(): string;
public encodedPassword(): string;
public queryParameter(param0: string): string;
public query(): string;
public password(): string;
public pathSegments(): java.util.List<any>;
public encodedPathSegments(): java.util.List<any>;
public hashCode(): number;
public resolve(param0: string): okhttp3.HttpUrl;
public pathSize(): number;
public equals(param0: java.lang.Object): boolean;
public isHttps(): boolean;
public newBuilder(): okhttp3.HttpUrl.Builder;
public port(): number;
public encodedQuery(): string;
public encodedPath(): string;
public encodedFragment(): string;
public redact(): string;
public fragment(): string;
public toString(): string;
public uri(): java.net.URI;
public queryParameterValue(param0: number): string;
public encodedUsername(): string;
public newBuilder(param0: string): okhttp3.HttpUrl.Builder;
public queryParameterValues(param0: string): java.util.List<any>;
public host(): string;
public static get(param0: java.net.URL): okhttp3.HttpUrl;
public static parse(param0: string): okhttp3.HttpUrl;
public url(): java.net.URL;
public querySize(): number;
public username(): string;
}
export module HttpUrl {
export class Builder extends java.lang.Object {
public addPathSegment(param0: string): okhttp3.HttpUrl.Builder;
public addEncodedPathSegment(param0: string): okhttp3.HttpUrl.Builder;
public setEncodedQueryParameter(param0: string, param1: string): okhttp3.HttpUrl.Builder;
public setQueryParameter(param0: string, param1: string): okhttp3.HttpUrl.Builder;
public encodedFragment(param0: string): okhttp3.HttpUrl.Builder;
public username(param0: string): okhttp3.HttpUrl.Builder;
public addPathSegments(param0: string): okhttp3.HttpUrl.Builder;
public encodedPath(param0: string): okhttp3.HttpUrl.Builder;
public encodedPassword(param0: string): okhttp3.HttpUrl.Builder;
public addEncodedPathSegments(param0: string): okhttp3.HttpUrl.Builder;
public encodedQuery(param0: string): okhttp3.HttpUrl.Builder;
public host(param0: string): okhttp3.HttpUrl.Builder;
public removeAllEncodedQueryParameters(param0: string): okhttp3.HttpUrl.Builder;
public setEncodedPathSegment(param0: number, param1: string): okhttp3.HttpUrl.Builder;
public constructor();
public encodedUsername(param0: string): okhttp3.HttpUrl.Builder;
public password(param0: string): okhttp3.HttpUrl.Builder;
public port(param0: number): okhttp3.HttpUrl.Builder;
public toString(): string;
public addQueryParameter(param0: string, param1: string): okhttp3.HttpUrl.Builder;
public addEncodedQueryParameter(param0: string, param1: string): okhttp3.HttpUrl.Builder;
public query(param0: string): okhttp3.HttpUrl.Builder;
public setPathSegment(param0: number, param1: string): okhttp3.HttpUrl.Builder;
public removeAllQueryParameters(param0: string): okhttp3.HttpUrl.Builder;
public scheme(param0: string): okhttp3.HttpUrl.Builder;
public removePathSegment(param0: number): okhttp3.HttpUrl.Builder;
public fragment(param0: string): okhttp3.HttpUrl.Builder;
public build(): okhttp3.HttpUrl;
}
export module Builder {
export class ParseResult extends java.lang.Enum {
public static SUCCESS: okhttp3.HttpUrl.Builder.ParseResult;
public static MISSING_SCHEME: okhttp3.HttpUrl.Builder.ParseResult;
public static UNSUPPORTED_SCHEME: okhttp3.HttpUrl.Builder.ParseResult;
public static INVALID_PORT: okhttp3.HttpUrl.Builder.ParseResult;
public static INVALID_HOST: okhttp3.HttpUrl.Builder.ParseResult;
public static values(): native.Array<okhttp3.HttpUrl.Builder.ParseResult>;
public static valueOf(param0: string): okhttp3.HttpUrl.Builder.ParseResult;
public static valueOf(param0: java.lang.Class, param1: string): java.lang.Enum;
}
}
}
}
declare module okhttp3 {
export class Interceptor extends java.lang.Object {
/**
* Constructs a new instance of the okhttp3.Interceptor interface with the provided implementation.
*/
public constructor(implementation: {
intercept(param0: okhttp3.Interceptor.Chain): okhttp3.Response;
});
public intercept(param0: okhttp3.Interceptor.Chain): okhttp3.Response;
}
export module Interceptor {
export class Chain extends java.lang.Object {
/**
* Constructs a new instance of the okhttp3.Interceptor$Chain interface with the provided implementation.
*/
public constructor(implementation: {
request(): okhttp3.Request;
proceed(param0: okhttp3.Request): okhttp3.Response;
connection(): okhttp3.Connection;
});
public request(): okhttp3.Request;
public proceed(param0: okhttp3.Request): okhttp3.Response;
public connection(): okhttp3.Connection;
}
}
}
declare module okhttp3 {
export class MediaType extends java.lang.Object {
public type(): string;
public charset(): java.nio.charset.Charset;
public subtype(): string;
public charset(param0: java.nio.charset.Charset): java.nio.charset.Charset;
public hashCode(): number;
public static parse(param0: string): okhttp3.MediaType;
public toString(): string;
public equals(param0: java.lang.Object): boolean;
}
}
declare module okhttp3 {
export class MultipartBody extends okhttp3.RequestBody {
public static MIXED: okhttp3.MediaType;
public static ALTERNATIVE: okhttp3.MediaType;
public static DIGEST: okhttp3.MediaType;
public static PARALLEL: okhttp3.MediaType;
public static FORM: okhttp3.MediaType;
public boundary(): string;
public parts(): java.util.List<any>;
public size(): number;
public type(): okhttp3.MediaType;
public contentType(): okhttp3.MediaType;
public writeTo(param0: okio.BufferedSink): void;
public part(param0: number): okhttp3.MultipartBody.Part;
public contentLength(): number;
}
export module MultipartBody {
export class Builder extends java.lang.Object {
public setType(param0: okhttp3.MediaType): okhttp3.MultipartBody.Builder;
public addPart(param0: okhttp3.MultipartBody.Part): okhttp3.MultipartBody.Builder;
public build(): okhttp3.MultipartBody;
public addPart(param0: okhttp3.Headers, param1: okhttp3.RequestBody): okhttp3.MultipartBody.Builder;
public addPart(param0: okhttp3.RequestBody): okhttp3.MultipartBody.Builder;
public constructor();
public addFormDataPart(param0: string, param1: string): okhttp3.MultipartBody.Builder;
public addFormDataPart(param0: string, param1: string, param2: okhttp3.RequestBody): okhttp3.MultipartBody.Builder;
public constructor(param0: string);
}
export class Part extends java.lang.Object {
public headers(): okhttp3.Headers;
public static create(param0: okhttp3.Headers, param1: okhttp3.RequestBody): okhttp3.MultipartBody.Part;
public static createFormData(param0: string, param1: string, param2: okhttp3.RequestBody): okhttp3.MultipartBody.Part;
public static create(param0: okhttp3.RequestBody): okhttp3.MultipartBody.Part;
public static createFormData(param0: string, param1: string): okhttp3.MultipartBody.Part;
public body(): okhttp3.RequestBody;
}
}
}
declare module okhttp3 {
export class OkHttpClient extends java.lang.Object implements java.lang.Cloneable, okhttp3.Call.Factory, okhttp3.WebSocket.Factory {
public proxy(): java.net.Proxy;
public sslSocketFactory(): javax.net.ssl.SSLSocketFactory;
public connectionPool(): okhttp3.ConnectionPool;
public cache(): okhttp3.Cache;
public certificatePinner(): okhttp3.CertificatePinner;
public dispatcher(): okhttp3.Dispatcher;
public networkInterceptors(): java.util.List<any>;
public dns(): okhttp3.Dns;
public proxyAuthenticator(): okhttp3.Authenticator;
public hostnameVerifier(): javax.net.ssl.HostnameVerifier;
public connectTimeoutMillis(): number;
public pingIntervalMillis(): number;
public cookieJar(): okhttp3.CookieJar;
public connectionSpecs(): java.util.List<any>;
public newBuilder(): okhttp3.OkHttpClient.Builder;
public constructor();
public proxySelector(): java.net.ProxySelector;
public protocols(): java.util.List<any>;
public readTimeoutMillis(): number;
public authenticator(): okhttp3.Authenticator;
public followRedirects(): boolean;
public writeTimeoutMillis(): number;
public newWebSocket(param0: okhttp3.Request, param1: okhttp3.WebSocketListener): okhttp3.WebSocket;
public followSslRedirects(): boolean;
public socketFactory(): javax.net.SocketFactory;
public interceptors(): java.util.List<any>;
public retryOnConnectionFailure(): boolean;
public newCall(param0: okhttp3.Request): okhttp3.Call;
}
export module OkHttpClient {
export class Builder extends java.lang.Object {
public addInterceptor(param0: okhttp3.Interceptor): okhttp3.OkHttpClient.Builder;
public connectionPool(param0: okhttp3.ConnectionPool): okhttp3.OkHttpClient.Builder;
public readTimeout(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.OkHttpClient.Builder;
public dns(param0: okhttp3.Dns): okhttp3.OkHttpClient.Builder;
public pingInterval(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.OkHttpClient.Builder;
public networkInterceptors(): java.util.List<any>;
public build(): okhttp3.OkHttpClient;
public sslSocketFactory(param0: javax.net.ssl.SSLSocketFactory): okhttp3.OkHttpClient.Builder;
public interceptors(): java.util.List<any>;
public proxyAuthenticator(param0: okhttp3.Authenticator): okhttp3.OkHttpClient.Builder;
public followRedirects(param0: boolean): okhttp3.OkHttpClient.Builder;
public cache(param0: okhttp3.Cache): okhttp3.OkHttpClient.Builder;
public sslSocketFactory(param0: javax.net.ssl.SSLSocketFactory, param1: javax.net.ssl.X509TrustManager): okhttp3.OkHttpClient.Builder;
public connectionSpecs(param0: java.util.List<any>): okhttp3.OkHttpClient.Builder;
public cookieJar(param0: okhttp3.CookieJar): okhttp3.OkHttpClient.Builder;
public connectTimeout(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.OkHttpClient.Builder;
public protocols(param0: java.util.List<any>): okhttp3.OkHttpClient.Builder;
public followSslRedirects(param0: boolean): okhttp3.OkHttpClient.Builder;
public constructor();
public dispatcher(param0: okhttp3.Dispatcher): okhttp3.OkHttpClient.Builder;
public proxySelector(param0: java.net.ProxySelector): okhttp3.OkHttpClient.Builder;
public socketFactory(param0: javax.net.SocketFactory): okhttp3.OkHttpClient.Builder;
public retryOnConnectionFailure(param0: boolean): okhttp3.OkHttpClient.Builder;
public writeTimeout(param0: number, param1: java.util.concurrent.TimeUnit): okhttp3.OkHttpClient.Builder;
public addNetworkInterceptor(param0: okhttp3.Interceptor): okhttp3.OkHttpClient.Builder;
public hostnameVerifier(param0: javax.net.ssl.HostnameVerifier): okhttp3.OkHttpClient.Builder;
public authenticator(param0: okhttp3.Authenticator): okhttp3.OkHttpClient.Builder;
public proxy(param0: java.net.Proxy): okhttp3.OkHttpClient.Builder;
public certificatePinner(param0: okhttp3.CertificatePinner): okhttp3.OkHttpClient.Builder;
}
}
}
declare module okhttp3 {
export class Protocol extends java.lang.Enum {
public static HTTP_1_0: okhttp3.Protocol;
public static HTTP_1_1: okhttp3.Protocol;
public static SPDY_3: okhttp3.Protocol;
public static HTTP_2: okhttp3.Protocol;
public static valueOf(param0: string): okhttp3.Protocol;
public static get(param0: string): okhttp3.Protocol;
public static valueOf(param0: java.lang.Class, param1: string): java.lang.Enum;
public static values(): native.Array<okhttp3.Protocol>;
public toString(): string;
}
}
declare module okhttp3 {
export class RealCall extends java.lang.Object implements okhttp3.Call {
public clone(): okhttp3.RealCall;
public isExecuted(): boolean;
public clone(): okhttp3.Call;
public request(): okhttp3.Request;
public execute(): okhttp3.Response;
public isCanceled(): boolean;
public clone(): java.lang.Object;
public enqueue(param0: okhttp3.Callback): void;
public cancel(): void;
}
export module RealCall {
export class AsyncCall extends okhttp3.internal.NamedRunnable {
public execute(): void;
public run(): void;
}
}
}
declare module okhttp3 {
export class Request extends java.lang.Object {
public header(param0: string): string;
public tag(): java.lang.Object;
public headers(): okhttp3.Headers;
public newBuilder(): okhttp3.Request.Builder;
public url(): okhttp3.HttpUrl;
public cacheControl(): okhttp3.CacheControl;
public method(): string;
public toString(): string;
public body(): okhttp3.RequestBody;
public headers(param0: string): java.util.List<any>;
public isHttps(): boolean;
}
export module Request {
export class Builder extends java.lang.Object {
public url(param0: okhttp3.HttpUrl): okhttp3.Request.Builder;
public url(param0: java.net.URL): okhttp3.Request.Builder;
public header(param0: string, param1: string): okhttp3.Request.Builder;
public headers(param0: okhttp3.Headers): okhttp3.Request.Builder;
public put(param0: okhttp3.RequestBody): okhttp3.Request.Builder;
public delete(): okhttp3.Request.Builder;
public get(): okhttp3.Request.Builder;
public constructor();
public addHeader(param0: string, param1: string): okhttp3.Request.Builder;
public post(param0: okhttp3.RequestBody): okhttp3.Request.Builder;
public delete(param0: okhttp3.RequestBody): okhttp3.Request.Builder;
public patch(param0: okhttp3.RequestBody): okhttp3.Request.Builder;
public build(): okhttp3.Request;
public method(param0: string, param1: okhttp3.RequestBody): okhttp3.Request.Builder;
public url(param0: string): okhttp3.Request.Builder;
public removeHeader(param0: string): okhttp3.Request.Builder;
public cacheControl(param0: okhttp3.CacheControl): okhttp3.Request.Builder;
public head(): okhttp3.Request.Builder;
public tag(param0: java.lang.Object): okhttp3.Request.Builder;
}
}
}
declare module okhttp3 {
export abstract class RequestBody extends java.lang.Object {
public constructor();
public static create(param0: okhttp3.MediaType, param1: okio.ByteString): okhttp3.RequestBody;
public static create(param0: okhttp3.MediaType, param1: java.io.File): okhttp3.RequestBody;
public static create(param0: okhttp3.MediaType, param1: string): okhttp3.RequestBody;
public contentType(): okhttp3.MediaType;
public writeTo(param0: okio.BufferedSink): void;
public static create(param0: okhttp3.MediaType, param1: native.Array<number>): okhttp3.RequestBody;
public contentLength(): number;
public static create(param0: okhttp3.MediaType, param1: native.Array<number>, param2: number, param3: number): okhttp3.RequestBody;
}
}
declare module okhttp3 {
export class Response extends java.lang.Object implements java.io.Closeable {
public headers(): okhttp3.Headers;
public priorResponse(): okhttp3.Response;
public close(): void;
public cacheResponse(): okhttp3.Response;
public challenges(): java.util.List<any>;
public sentRequestAtMillis(): number;
public cacheControl(): okhttp3.CacheControl;
public toString(): string;
public handshake(): okhttp3.Handshake;
public peekBody(param0: number): okhttp3.ResponseBody;
public isSuccessful(): boolean;
public header(param0: string): string;
public header(param0: string, param1: string): string;
public body(): okhttp3.ResponseBody;
public networkResponse(): okhttp3.Response;
public newBuilder(): okhttp3.Response.Builder;
public request(): okhttp3.Request;
public code(): number;
public protocol(): okhttp3.Protocol;
public message(): string;
public receivedResponseAtMillis(): number;
public isRedirect(): boolean;
public headers(param0: string): java.util.List<any>;
}
export module Response {
export class Builder extends java.lang.Object {
public cacheResponse(param0: okhttp3.Response): okhttp3.Response.Builder;
public body(param0: okhttp3.ResponseBody): okhttp3.Response.Builder;
public message(param0: string): okhttp3.Response.Builder;
public request(param0: okhttp3.Request): okhttp3.Response.Builder;
public header(param0: string, param1: string): okhttp3.Response.Builder;
public headers(param0: okhttp3.Headers): okhttp3.Response.Builder;
public sentRequestAtMillis(param0: number): okhttp3.Response.Builder;
public priorResponse(param0: okhttp3.Response): okhttp3.Response.Builder;
public networkResponse(param0: okhttp3.Response): okhttp3.Response.Builder;
public constructor();
public removeHeader(param0: string): okhttp3.Response.Builder;
public handshake(param0: okhttp3.Handshake): okhttp3.Response.Builder;
public addHeader(param0: string, param1: string): okhttp3.Response.Builder;
public code(param0: number): okhttp3.Response.Builder;
public build(): okhttp3.Response;
public protocol(param0: okhttp3.Protocol): okhttp3.Response.Builder;
public receivedResponseAtMillis(param0: number): okhttp3.Response.Builder;
}
}
}
declare module okhttp3 {
export abstract class ResponseBody extends java.lang.Object implements java.io.Closeable {
public constructor();
public byteStream(): java.io.InputStream;
public bytes(): native.Array<number>;
public static create(param0: okhttp3.MediaType, param1: native.Array<number>): okhttp3.ResponseBody;
public static create(param0: okhttp3.MediaType, param1: number, param2: okio.BufferedSource): okhttp3.ResponseBody;
public close(): void;
public charStream(): java.io.Reader;
public contentType(): okhttp3.MediaType;
public source(): okio.BufferedSource;
public string(): string;
public contentLength(): number;
public static create(param0: okhttp3.MediaType, param1: string): okhttp3.ResponseBody;
}
export module ResponseBody {
export class BomAwareReader extends java.io.Reader {
public read(param0: native.Array<string>): number;
public read(param0: java.nio.CharBuffer): number;
public read(param0: native.Array<string>, param1: number, param2: number): number;
public close(): void;
public read(): number;
}
}
}
declare module okhttp3 {
export class Route extends java.lang.Object {
public proxy(): java.net.Proxy;
public constructor(param0: okhttp3.Address, param1: java.net.Proxy, param2: java.net.InetSocketAddress);
public address(): okhttp3.Address;
public hashCode(): number;
public requiresTunnel(): boolean;
public equals(param0: java.lang.Object): boolean;
public socketAddress(): java.net.InetSocketAddress;
}
}
declare module okhttp3 {
export class TlsVersion extends java.lang.Enum {
public static TLS_1_3: okhttp3.TlsVersion;
public static TLS_1_2: okhttp3.TlsVersion;
public static TLS_1_1: okhttp3.TlsVersion;
public static TLS_1_0: okhttp3.TlsVersion;
public static SSL_3_0: okhttp3.TlsVersion;
public javaName(): string;
public static valueOf(param0: java.lang.Class, param1: string): java.lang.Enum;
public static values(): native.Array<okhttp3.TlsVersion>;
public static valueOf(param0: string): okhttp3.TlsVersion;
public static forJavaName(param0: string): okhttp3.TlsVersion;
}
}
declare module okhttp3 {
export class WebSocket extends java.lang.Object {
/**
* Constructs a new instance of the okhttp3.WebSocket interface with the provided implementation.
*/
public constructor(implementation: {
request(): okhttp3.Request;
queueSize(): number;
send(param0: string): boolean;
send(param0: okio.ByteString): boolean;
close(param0: number, param1: string): boolean;
cancel(): void;
});
public send(param0: string): boolean;
public send(param0: okio.ByteString): boolean;
public close(param0: number, param1: string): boolean;
public request(): okhttp3.Request;
public queueSize(): number;
public cancel(): void;
}
export module WebSocket {
export class Factory extends java.lang.Object {
/**
* Constructs a new instance of the okhttp3.WebSocket$Factory interface with the provided implementation.
*/
public constructor(implementation: {
newWebSocket(param0: okhttp3.Request, param1: okhttp3.WebSocketListener): okhttp3.WebSocket;
});
public newWebSocket(param0: okhttp3.Request, param1: okhttp3.WebSocketListener): okhttp3.WebSocket;
}
}
}
declare module okhttp3 {
export abstract class WebSocketListener extends java.lang.Object {
public constructor();
public onClosed(param0: okhttp3.WebSocket, param1: number, param2: string): void;
public onMessage(param0: okhttp3.WebSocket, param1: okio.ByteString): void;
public onFailure(param0: okhttp3.WebSocket, param1: java.lang.Throwable, param2: okhttp3.Response): void;
public onOpen(param0: okhttp3.WebSocket, param1: okhttp3.Response): void;
public onClosing(param0: okhttp3.WebSocket, param1: number, param2: string): void;
public onMessage(param0: okhttp3.WebSocket, param1: string): void;
}
}
declare module okhttp3 {
export module internal {
export abstract class Internal extends java.lang.Object {
public static instance: okhttp3.internal.Internal;
public addLenient(param0: okhttp3.Headers.Builder, param1: string): void;
public connectionBecameIdle(param0: okhttp3.ConnectionPool, param1: okhttp3.internal.connection.RealConnection): boolean;
public setCache(param0: okhttp3.OkHttpClient.Builder, param1: okhttp3.internal.cache.InternalCache): void;
public newWebSocketCall(param0: okhttp3.OkHttpClient, param1: okhttp3.Request): okhttp3.Call;
public constructor();
public apply(param0: okhttp3.ConnectionSpec, param1: javax.net.ssl.SSLSocket, param2: boolean): void;
public put(param0: okhttp3.ConnectionPool, param1: okhttp3.internal.connection.RealConnection): void;