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
///命令 marker、完整参数与成功响应。
pub mod commands;
///事件 marker 和拥有型事件参数。
pub mod events;
///命名协议类型;不包含连接状态。
pub mod types;
///薄 Domain 视图,仅借用 Session;创建不发送数据。协议来源:Network。
///
///协议原文:
///
///<pre>Network domain allows tracking network activities of the page. It exposes information about http,
///file, data and other requests and responses, their headers, bodies, timing, etc.</pre>
///
///
pub struct Domain<'a> {
///借用的通信路由,生命周期不超过 Session。
pub(super) session: &'a ydp_core::Session,
}
impl<'a> Domain<'a> {
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.canClearBrowserCache。
///
///协议原文:
///
///<pre>Tells whether clearing browser cache is supported.</pre>
///
///此项已 deprecated,保留用于旧端点兼容。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::CanClearBrowserCacheParams) -> ydp_core::Result<()> {
///let response = session.network().can_clear_browser_cache(params).await?;
///# Ok(())
///# }
///```
pub fn can_clear_browser_cache(
&self,
params: commands::CanClearBrowserCacheParams,
) -> ydp_core::Request<commands::CanClearBrowserCache> {
self.session.send::<commands::CanClearBrowserCache>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.canClearBrowserCookies。
///
///协议原文:
///
///<pre>Tells whether clearing browser cookies is supported.</pre>
///
///此项已 deprecated,保留用于旧端点兼容。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::CanClearBrowserCookiesParams) -> ydp_core::Result<()> {
///let response = session.network().can_clear_browser_cookies(params).await?;
///# Ok(())
///# }
///```
pub fn can_clear_browser_cookies(
&self,
params: commands::CanClearBrowserCookiesParams,
) -> ydp_core::Request<commands::CanClearBrowserCookies> {
self.session
.send::<commands::CanClearBrowserCookies>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.canEmulateNetworkConditions。
///
///协议原文:
///
///<pre>Tells whether emulation of network conditions is supported.</pre>
///
///此项已 deprecated,保留用于旧端点兼容。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::CanEmulateNetworkConditionsParams) -> ydp_core::Result<()> {
///let response = session.network().can_emulate_network_conditions(params).await?;
///# Ok(())
///# }
///```
pub fn can_emulate_network_conditions(
&self,
params: commands::CanEmulateNetworkConditionsParams,
) -> ydp_core::Request<commands::CanEmulateNetworkConditions> {
self.session
.send::<commands::CanEmulateNetworkConditions>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.clearBrowserCache。
///
///协议原文:
///
///<pre>Clears browser cache.</pre>
///
///
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::ClearBrowserCacheParams) -> ydp_core::Result<()> {
///let response = session.network().clear_browser_cache(params).await?;
///# Ok(())
///# }
///```
pub fn clear_browser_cache(
&self,
params: commands::ClearBrowserCacheParams,
) -> ydp_core::Request<commands::ClearBrowserCache> {
self.session.send::<commands::ClearBrowserCache>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.clearBrowserCookies。
///
///协议原文:
///
///<pre>Clears browser cookies.</pre>
///
///
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::ClearBrowserCookiesParams) -> ydp_core::Result<()> {
///let response = session.network().clear_browser_cookies(params).await?;
///# Ok(())
///# }
///```
pub fn clear_browser_cookies(
&self,
params: commands::ClearBrowserCookiesParams,
) -> ydp_core::Request<commands::ClearBrowserCookies> {
self.session.send::<commands::ClearBrowserCookies>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.configureDurableMessages。
///
///协议原文:
///
///<pre>Configures storing response bodies outside of renderer, so that these survive
///a cross-process navigation.
///If maxTotalBufferSize is not set, durable messages are disabled.</pre>
///
///此项为 experimental,端点可能不支持。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::ConfigureDurableMessagesParams) -> ydp_core::Result<()> {
///let response = session.network().configure_durable_messages(params).await?;
///# Ok(())
///# }
///```
pub fn configure_durable_messages(
&self,
params: commands::ConfigureDurableMessagesParams,
) -> ydp_core::Request<commands::ConfigureDurableMessages> {
self.session
.send::<commands::ConfigureDurableMessages>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.deleteCookies。
///
///协议原文:
///
///<pre>Deletes browser cookies with matching name and url or domain/path/partitionKey pair.</pre>
///
///
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::DeleteCookiesParams) -> ydp_core::Result<()> {
///let response = session.network().delete_cookies(params).await?;
///# Ok(())
///# }
///```
pub fn delete_cookies(
&self,
params: commands::DeleteCookiesParams,
) -> ydp_core::Request<commands::DeleteCookies> {
self.session.send::<commands::DeleteCookies>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.deleteDeviceBoundSession。
///
///协议原文:
///
///<pre>Deletes a device bound session.</pre>
///
///此项为 experimental,端点可能不支持。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::DeleteDeviceBoundSessionParams) -> ydp_core::Result<()> {
///let response = session.network().delete_device_bound_session(params).await?;
///# Ok(())
///# }
///```
pub fn delete_device_bound_session(
&self,
params: commands::DeleteDeviceBoundSessionParams,
) -> ydp_core::Request<commands::DeleteDeviceBoundSession> {
self.session
.send::<commands::DeleteDeviceBoundSession>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.disable。
///
///协议原文:
///
///<pre>Disables network tracking, prevents network events from being sent to the client.</pre>
///
///
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::DisableParams) -> ydp_core::Result<()> {
///let response = session.network().disable(params).await?;
///# Ok(())
///# }
///```
pub fn disable(&self, params: commands::DisableParams) -> ydp_core::Request<commands::Disable> {
self.session.send::<commands::Disable>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.emulateNetworkConditions。
///
///协议原文:
///
///<pre>Activates emulation of network conditions. This command is deprecated in favor of the emulateNetworkConditionsByRule
///and overrideNetworkState commands, which can be used together to the same effect.</pre>
///
///此项已 deprecated,保留用于旧端点兼容。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::EmulateNetworkConditionsParams) -> ydp_core::Result<()> {
///let response = session.network().emulate_network_conditions(params).await?;
///# Ok(())
///# }
///```
pub fn emulate_network_conditions(
&self,
params: commands::EmulateNetworkConditionsParams,
) -> ydp_core::Request<commands::EmulateNetworkConditions> {
self.session
.send::<commands::EmulateNetworkConditions>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.emulateNetworkConditionsByRule。
///
///协议原文:
///
///<pre>Activates emulation of network conditions for individual requests using URL match patterns. Unlike the deprecated
///Network.emulateNetworkConditions this method does not affect `navigator` state. Use Network.overrideNetworkState to
///explicitly modify `navigator` behavior.</pre>
///
///此项为 experimental,端点可能不支持。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::EmulateNetworkConditionsByRuleParams) -> ydp_core::Result<()> {
///let response = session.network().emulate_network_conditions_by_rule(params).await?;
///# Ok(())
///# }
///```
pub fn emulate_network_conditions_by_rule(
&self,
params: commands::EmulateNetworkConditionsByRuleParams,
) -> ydp_core::Request<commands::EmulateNetworkConditionsByRule> {
self.session
.send::<commands::EmulateNetworkConditionsByRule>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.enable。
///
///协议原文:
///
///<pre>Enables network tracking, network events will now be delivered to the client.</pre>
///
///
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::EnableParams) -> ydp_core::Result<()> {
///let response = session.network().enable(params).await?;
///# Ok(())
///# }
///```
pub fn enable(&self, params: commands::EnableParams) -> ydp_core::Request<commands::Enable> {
self.session.send::<commands::Enable>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.enableDeviceBoundSessions。
///
///协议原文:
///
///<pre>Sets up tracking device bound sessions and fetching of initial set of sessions.</pre>
///
///此项为 experimental,端点可能不支持。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::EnableDeviceBoundSessionsParams) -> ydp_core::Result<()> {
///let response = session.network().enable_device_bound_sessions(params).await?;
///# Ok(())
///# }
///```
pub fn enable_device_bound_sessions(
&self,
params: commands::EnableDeviceBoundSessionsParams,
) -> ydp_core::Request<commands::EnableDeviceBoundSessions> {
self.session
.send::<commands::EnableDeviceBoundSessions>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.enableReportingApi。
///
///协议原文:
///
///<pre>Enables tracking for the Reporting API, events generated by the Reporting API will now be delivered to the client.
///Enabling triggers 'reportingApiReportAdded' for all existing reports.</pre>
///
///此项为 experimental,端点可能不支持。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::EnableReportingApiParams) -> ydp_core::Result<()> {
///let response = session.network().enable_reporting_api(params).await?;
///# Ok(())
///# }
///```
pub fn enable_reporting_api(
&self,
params: commands::EnableReportingApiParams,
) -> ydp_core::Request<commands::EnableReportingApi> {
self.session.send::<commands::EnableReportingApi>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.fetchSchemefulSite。
///
///协议原文:
///
///<pre>Fetches the schemeful site for a specific origin.</pre>
///
///此项为 experimental,端点可能不支持。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::FetchSchemefulSiteParams) -> ydp_core::Result<()> {
///let response = session.network().fetch_schemeful_site(params).await?;
///# Ok(())
///# }
///```
pub fn fetch_schemeful_site(
&self,
params: commands::FetchSchemefulSiteParams,
) -> ydp_core::Request<commands::FetchSchemefulSite> {
self.session.send::<commands::FetchSchemefulSite>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.getAllCookies。
///
///协议原文:
///
///<pre>Returns all browser cookies. Depending on the backend support, will return detailed cookie
///information in the `cookies` field.
///Deprecated. Use Storage.getCookies instead.</pre>
///
///此项已 deprecated,保留用于旧端点兼容。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::GetAllCookiesParams) -> ydp_core::Result<()> {
///let response = session.network().get_all_cookies(params).await?;
///# Ok(())
///# }
///```
pub fn get_all_cookies(
&self,
params: commands::GetAllCookiesParams,
) -> ydp_core::Request<commands::GetAllCookies> {
self.session.send::<commands::GetAllCookies>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.getCertificate。
///
///协议原文:
///
///<pre>Returns the DER-encoded certificate.</pre>
///
///此项为 experimental,端点可能不支持。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::GetCertificateParams) -> ydp_core::Result<()> {
///let response = session.network().get_certificate(params).await?;
///# Ok(())
///# }
///```
pub fn get_certificate(
&self,
params: commands::GetCertificateParams,
) -> ydp_core::Request<commands::GetCertificate> {
self.session.send::<commands::GetCertificate>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.getCookies。
///
///协议原文:
///
///<pre>Returns all browser cookies for the current URL. Depending on the backend support, will return
///detailed cookie information in the `cookies` field.</pre>
///
///
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::GetCookiesParams) -> ydp_core::Result<()> {
///let response = session.network().get_cookies(params).await?;
///# Ok(())
///# }
///```
pub fn get_cookies(
&self,
params: commands::GetCookiesParams,
) -> ydp_core::Request<commands::GetCookies> {
self.session.send::<commands::GetCookies>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.getRequestPostData。
///
///协议原文:
///
///<pre>Returns post data sent with the request. Returns an error when no data was sent with the request.</pre>
///
///
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::GetRequestPostDataParams) -> ydp_core::Result<()> {
///let response = session.network().get_request_post_data(params).await?;
///# Ok(())
///# }
///```
pub fn get_request_post_data(
&self,
params: commands::GetRequestPostDataParams,
) -> ydp_core::Request<commands::GetRequestPostData> {
self.session.send::<commands::GetRequestPostData>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.getResponseBody。
///
///协议原文:
///
///<pre>Returns content served for the given request.</pre>
///
///
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::GetResponseBodyParams) -> ydp_core::Result<()> {
///let response = session.network().get_response_body(params).await?;
///# Ok(())
///# }
///```
pub fn get_response_body(
&self,
params: commands::GetResponseBodyParams,
) -> ydp_core::Request<commands::GetResponseBody> {
self.session.send::<commands::GetResponseBody>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.getSecurityIsolationStatus。
///
///协议原文:
///
///<pre>Returns information about the COEP/COOP isolation status.</pre>
///
///此项为 experimental,端点可能不支持。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::GetSecurityIsolationStatusParams) -> ydp_core::Result<()> {
///let response = session.network().get_security_isolation_status(params).await?;
///# Ok(())
///# }
///```
pub fn get_security_isolation_status(
&self,
params: commands::GetSecurityIsolationStatusParams,
) -> ydp_core::Request<commands::GetSecurityIsolationStatus> {
self.session
.send::<commands::GetSecurityIsolationStatus>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.loadNetworkResource。
///
///协议原文:
///
///<pre>Fetches the resource and returns the content.</pre>
///
///此项为 experimental,端点可能不支持。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::LoadNetworkResourceParams) -> ydp_core::Result<()> {
///let response = session.network().load_network_resource(params).await?;
///# Ok(())
///# }
///```
pub fn load_network_resource(
&self,
params: commands::LoadNetworkResourceParams,
) -> ydp_core::Request<commands::LoadNetworkResource> {
self.session.send::<commands::LoadNetworkResource>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.overrideNetworkState。
///
///协议原文:
///
///<pre>Override the state of navigator.onLine and navigator.connection.</pre>
///
///此项为 experimental,端点可能不支持。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::OverrideNetworkStateParams) -> ydp_core::Result<()> {
///let response = session.network().override_network_state(params).await?;
///# Ok(())
///# }
///```
pub fn override_network_state(
&self,
params: commands::OverrideNetworkStateParams,
) -> ydp_core::Request<commands::OverrideNetworkState> {
self.session.send::<commands::OverrideNetworkState>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.replayXHR。
///
///协议原文:
///
///<pre>This method sends a new XMLHttpRequest which is identical to the original one. The following
///parameters should be identical: method, url, async, request body, extra headers, withCredentials
///attribute, user, password.</pre>
///
///此项为 experimental,端点可能不支持。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::ReplayXhrParams) -> ydp_core::Result<()> {
///let response = session.network().replay_xhr(params).await?;
///# Ok(())
///# }
///```
pub fn replay_xhr(
&self,
params: commands::ReplayXhrParams,
) -> ydp_core::Request<commands::ReplayXhr> {
self.session.send::<commands::ReplayXhr>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.searchInResponseBody。
///
///协议原文:
///
///<pre>Searches for given string in response content.</pre>
///
///此项为 experimental,端点可能不支持。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::SearchInResponseBodyParams) -> ydp_core::Result<()> {
///let response = session.network().search_in_response_body(params).await?;
///# Ok(())
///# }
///```
pub fn search_in_response_body(
&self,
params: commands::SearchInResponseBodyParams,
) -> ydp_core::Request<commands::SearchInResponseBody> {
self.session.send::<commands::SearchInResponseBody>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.setAttachDebugStack。
///
///协议原文:
///
///<pre>Specifies whether to attach a page script stack id in requests</pre>
///
///此项为 experimental,端点可能不支持。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::SetAttachDebugStackParams) -> ydp_core::Result<()> {
///let response = session.network().set_attach_debug_stack(params).await?;
///# Ok(())
///# }
///```
pub fn set_attach_debug_stack(
&self,
params: commands::SetAttachDebugStackParams,
) -> ydp_core::Request<commands::SetAttachDebugStack> {
self.session.send::<commands::SetAttachDebugStack>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.setBlockedURLs。
///
///协议原文:
///
///<pre>Blocks URLs from loading.</pre>
///
///此项为 experimental,端点可能不支持。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::SetBlockedUrLsParams) -> ydp_core::Result<()> {
///let response = session.network().set_blocked_ur_ls(params).await?;
///# Ok(())
///# }
///```
pub fn set_blocked_ur_ls(
&self,
params: commands::SetBlockedUrLsParams,
) -> ydp_core::Request<commands::SetBlockedUrLs> {
self.session.send::<commands::SetBlockedUrLs>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.setBypassServiceWorker。
///
///协议原文:
///
///<pre>Toggles ignoring of service worker for each request.</pre>
///
///
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::SetBypassServiceWorkerParams) -> ydp_core::Result<()> {
///let response = session.network().set_bypass_service_worker(params).await?;
///# Ok(())
///# }
///```
pub fn set_bypass_service_worker(
&self,
params: commands::SetBypassServiceWorkerParams,
) -> ydp_core::Request<commands::SetBypassServiceWorker> {
self.session
.send::<commands::SetBypassServiceWorker>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.setCacheDisabled。
///
///协议原文:
///
///<pre>Toggles ignoring cache for each request. If `true`, cache will not be used.</pre>
///
///
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::SetCacheDisabledParams) -> ydp_core::Result<()> {
///let response = session.network().set_cache_disabled(params).await?;
///# Ok(())
///# }
///```
pub fn set_cache_disabled(
&self,
params: commands::SetCacheDisabledParams,
) -> ydp_core::Request<commands::SetCacheDisabled> {
self.session.send::<commands::SetCacheDisabled>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.setCookie。
///
///协议原文:
///
///<pre>Sets a cookie with the given cookie data; may overwrite equivalent cookies if they exist.</pre>
///
///
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::SetCookieParams) -> ydp_core::Result<()> {
///let response = session.network().set_cookie(params).await?;
///# Ok(())
///# }
///```
pub fn set_cookie(
&self,
params: commands::SetCookieParams,
) -> ydp_core::Request<commands::SetCookie> {
self.session.send::<commands::SetCookie>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.setCookieControls。
///
///协议原文:
///
///<pre>Sets Controls for third-party cookie access
///Page reload is required before the new cookie behavior will be observed</pre>
///
///此项为 experimental,端点可能不支持。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::SetCookieControlsParams) -> ydp_core::Result<()> {
///let response = session.network().set_cookie_controls(params).await?;
///# Ok(())
///# }
///```
pub fn set_cookie_controls(
&self,
params: commands::SetCookieControlsParams,
) -> ydp_core::Request<commands::SetCookieControls> {
self.session.send::<commands::SetCookieControls>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.setCookies。
///
///协议原文:
///
///<pre>Sets given cookies.</pre>
///
///
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::SetCookiesParams) -> ydp_core::Result<()> {
///let response = session.network().set_cookies(params).await?;
///# Ok(())
///# }
///```
pub fn set_cookies(
&self,
params: commands::SetCookiesParams,
) -> ydp_core::Request<commands::SetCookies> {
self.session.send::<commands::SetCookies>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.setExtraHTTPHeaders。
///
///协议原文:
///
///<pre>Specifies whether to always send extra HTTP headers with the requests from this page.</pre>
///
///
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::SetExtraHttpHeadersParams) -> ydp_core::Result<()> {
///let response = session.network().set_extra_http_headers(params).await?;
///# Ok(())
///# }
///```
pub fn set_extra_http_headers(
&self,
params: commands::SetExtraHttpHeadersParams,
) -> ydp_core::Request<commands::SetExtraHttpHeaders> {
self.session.send::<commands::SetExtraHttpHeaders>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.setUserAgentOverride。
///
///协议原文:
///
///<pre>Allows overriding user agent with the given string.</pre>
///
///
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::SetUserAgentOverrideParams) -> ydp_core::Result<()> {
///let response = session.network().set_user_agent_override(params).await?;
///# Ok(())
///# }
///```
pub fn set_user_agent_override(
&self,
params: commands::SetUserAgentOverrideParams,
) -> ydp_core::Request<commands::SetUserAgentOverride> {
self.session.send::<commands::SetUserAgentOverride>(params)
}
///拥有参数并返回冷 Request;首次 poll 才提交,Drop 仅结束本地等待,发布后远端可能继续执行。协议来源:Network.command.streamResourceContent。
///
///协议原文:
///
///<pre>Enables streaming of the response for the given requestId.
///If enabled, the dataReceived event contains the data that was received during streaming.</pre>
///
///此项为 experimental,端点可能不支持。
///
///```no_run
///use ydp::SessionDomains as _;
///# async fn call(session: &ydp_core::Session, params: ydp::network::commands::StreamResourceContentParams) -> ydp_core::Result<()> {
///let response = session.network().stream_resource_content(params).await?;
///# Ok(())
///# }
///```
pub fn stream_resource_content(
&self,
params: commands::StreamResourceContentParams,
) -> ydp_core::Request<commands::StreamResourceContent> {
self.session.send::<commands::StreamResourceContent>(params)
}
}