Skip to content

Instantly share code, notes, and snippets.

@kbarber
Created May 23, 2012 22:01
Show Gist options
  • Select an option

  • Save kbarber/2778107 to your computer and use it in GitHub Desktop.

Select an option

Save kbarber/2778107 to your computer and use it in GitHub Desktop.
db api with multipart
Content-Type: multipart/form-data; boundary=AaB03x
--AaB03x
Content-Disposition: form-data; name="payload"
{"command": "publish module",
"version": 123,
"payload": {"foo":"bar"}}
--AaB03x
Content-Disposition: form-data; name="files"
Content-Type: multipart/mixed; boundary=BbC04y
--BbC04y
Content-Disposition: file; filename="file1.txt"
Content-Type: text/plain
... contents of file1.txt ...
--BbC04y
Content-Disposition: file; filename="file2.gif"
Content-Type: image/gif
Content-Transfer-Encoding: binary
...contents of file2.gif...
--BbC04y--
--AaB03x--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment