@@ -21,6 +21,9 @@ pub struct SyntheticsTestOptions {
2121 /// Array of URL patterns to block.
2222 #[ serde( rename = "blockedRequestPatterns" ) ]
2323 pub blocked_request_patterns : Option < Vec < String > > ,
24+ /// Capture HTTP request/response headers and bodies for Fetch/XHR calls made during browser tests.
25+ #[ serde( rename = "captureNetworkPayloads" ) ]
26+ pub capture_network_payloads : Option < bool > ,
2427 /// For SSL tests, whether or not the test should fail on revoked certificate in stapled OCSP.
2528 #[ serde( rename = "checkCertificateRevocation" ) ]
2629 pub check_certificate_revocation : Option < bool > ,
@@ -118,6 +121,7 @@ impl SyntheticsTestOptions {
118121 accept_self_signed : None ,
119122 allow_insecure : None ,
120123 blocked_request_patterns : None ,
124+ capture_network_payloads : None ,
121125 check_certificate_revocation : None ,
122126 ci : None ,
123127 device_ids : None ,
@@ -164,6 +168,12 @@ impl SyntheticsTestOptions {
164168 self
165169 }
166170
171+ #[ allow( deprecated) ]
172+ pub fn capture_network_payloads ( mut self , value : bool ) -> Self {
173+ self . capture_network_payloads = Some ( value) ;
174+ self
175+ }
176+
167177 #[ allow( deprecated) ]
168178 pub fn check_certificate_revocation ( mut self , value : bool ) -> Self {
169179 self . check_certificate_revocation = Some ( value) ;
@@ -349,6 +359,7 @@ impl<'de> Deserialize<'de> for SyntheticsTestOptions {
349359 let mut accept_self_signed: Option < bool > = None ;
350360 let mut allow_insecure: Option < bool > = None ;
351361 let mut blocked_request_patterns: Option < Vec < String > > = None ;
362+ let mut capture_network_payloads: Option < bool > = None ;
352363 let mut check_certificate_revocation: Option < bool > = None ;
353364 let mut ci: Option < crate :: datadogV1:: model:: SyntheticsTestCiOptions > = None ;
354365 let mut device_ids: Option < Vec < String > > = None ;
@@ -409,6 +420,13 @@ impl<'de> Deserialize<'de> for SyntheticsTestOptions {
409420 blocked_request_patterns =
410421 Some ( serde_json:: from_value ( v) . map_err ( M :: Error :: custom) ?) ;
411422 }
423+ "captureNetworkPayloads" => {
424+ if v. is_null ( ) {
425+ continue ;
426+ }
427+ capture_network_payloads =
428+ Some ( serde_json:: from_value ( v) . map_err ( M :: Error :: custom) ?) ;
429+ }
412430 "checkCertificateRevocation" => {
413431 if v. is_null ( ) {
414432 continue ;
@@ -586,6 +604,7 @@ impl<'de> Deserialize<'de> for SyntheticsTestOptions {
586604 accept_self_signed,
587605 allow_insecure,
588606 blocked_request_patterns,
607+ capture_network_payloads,
589608 check_certificate_revocation,
590609 ci,
591610 device_ids,
0 commit comments