fix(har): reconstruct form bodies from postData.params (#9) · littledivy/mimic@847e54d · GitHub
Skip to content

Commit 847e54d

Browse files
authored
fix(har): reconstruct form bodies from postData.params (#9)
HAR request bodies for application/x-www-form-urlencoded may be encoded as postData.params (array of {name, value}) with no postData.text field (e.g. Chrome DevTools export). _body_bytes read only text, so those bodies were silently dropped and the generated client method lost its request fields. Fall back to url-encoding params when text is absent, matching the HAR spec. Fixes #8 Co-authored-by: thejesh23 <thejesh23@users.noreply.github.com>
1 parent 027bc48 commit 847e54d

2 files changed

Lines changed: 23 additions & 3 deletions

File tree

‎mimic/sources/har.py‎

Lines changed: 11 additions & 3 deletions

‎tests/test_har.py‎

Lines changed: 12 additions & 0 deletions

0 commit comments

Comments
 (0)