()
| 572 | } |
| 573 | } |
| 574 | } |
| 575 | ], |
| 576 | "id": "18e78361", |
| 577 | "regs": { |
| 578 | "ext": { |
| 579 | "gdpr": 1 |
| 580 | } |
| 581 | } |
| 582 | }'"#; |
| 583 | let parsed = parse_curl(cmd).unwrap(); |
| 584 | assert_eq!(parsed.method, HttpMethod::Post); |
| 585 | assert_eq!(parsed.url, "https://ssp.veonadx.com/bid/prebid"); |
| 586 | assert_eq!(parsed.headers.len(), 1); |
| 587 | assert_eq!(parsed.headers[0].key, "Content-Type"); |
| 588 | assert_eq!(parsed.headers[0].value, "application/json"); |
| 589 | match parsed.body { |
| 590 | RequestBody::Json(s) => { |
| 591 | assert!(s.contains("\"imp\"")); |
| 592 | assert!(s.contains("\"gdpr\"")); |
| 593 | } |
| 594 | other => panic!("expected JSON body, got {:?}", other), |
| 595 | } |
| 596 | } |
| 597 | } |
nothing calls this directly
no test coverage detected