Skip to content

jinze/form_data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FormData

Build a multipart/form-data form struct in Elixir.

I need { :mime, github: "dynamo/mime" } as a dependency.

form = FormData.init()
|> FormData.put("name", "Z. Jin")
|> FormData.put("age", 28)
|> FormData.put("file1", "//I pretend to a script file","script.js", "text/javascript")
|> FormData.putFile("file2", "../my_picture.png")
|> FormData.putFile("file3", "../my_file", "plain/text")
|> FormData.final()

IO.inspect form
IO.inspect FormData.headers(form)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages