Skip to content

Can't access headers of parts of multipart request #2150

Closed
@kwach

Description

@kwach

Hey,

I have a case where I need to read some data passed in headers along files in a multipart request.

Currently there is a struct

struct MultipartFormData {
  std::string name;
  std::string content;
  std::string filename;
  std::string content_type;
};

What I'd like to propose is:

struct MultipartFormData {
  std::string name;
  std::string content;
  std::string filename;
  std::string content_type; //deprecated
  Headers headers;
};

Where Headers is (quite awesomely):

using Headers =
    std::unordered_multimap<std::string, std::string, detail::case_ignore::hash,
                            detail::case_ignore::equal_to>;

I'll provide a PR if this is Ok

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions