Skip to content

Feature request: parse mulitpart form data into a dict #263

@piever

Description

@piever

Julia 0.6.3
HTTP.jl 0.6.12
MbedTLS.jl 0.5.11

This has been mentioned in #59, but it seems like the issue was closed without a solution for the thing I'd like to do. What I gather from that issue is that if one is sending a request in Julia to a Julia server, then the recommended way is for the request body to be a JSON string which will be sent as is. However, if the request comes from an actual form in a website, then the body will definitely be a multipart form.

I am trying to understand what is the best way to analyze that kind of data in Julia once it reaches the server, meaning are there some tools to decompose a multipart form back into a dictionary so that one can work with it in Julia?

If this doesn't exist and nobody is working on it, I'm happy to give it a go (though I have very little experience with string processing, so I may take a while). What would the easiest way to do this be? Just get the boundary from the header, then split the body by the boundary and use regexes to get all the relevant information?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions