Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
piever opened this issue Jun 30, 2018 · 1 comment
Closed

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

piever opened this issue Jun 30, 2018 · 1 comment

Comments

@piever
Copy link
Contributor

piever commented Jun 30, 2018

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?

@fredrikekre
Copy link
Member

#514, #745

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants