multipart-post icon indicating copy to clipboard operation
multipart-post copied to clipboard

Properly handle nested params

Open ioquatix opened this issue 2 years ago • 1 comments

https://github.com/socketry/multipart-post/pull/52

Types of Changes

  • Bug fix.
  • New feature.

Testing

  • [ ] I added tests for my changes.
  • [ ] I tested my changes locally.
  • [ ] I tested my changes in staging.
  • [ ] I tested my changes in production.

ioquatix avatar Jun 02 '22 12:06 ioquatix

It turns out handling headers is a bit more complex. The part headers are indexed by key, but this won't work for nested parts, we either need:

  1. Nested part headers based on keys, computed during recursion, i.e. part_headers[k] - we'd also might need to ignore non-string-key headers when constructing parts.
  2. Flat part headers indexed by full key prefix/path.

ioquatix avatar Jun 02 '22 13:06 ioquatix