Skip to content

Instantly share code, notes, and snippets.

@aaronpk
Last active January 16, 2016 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaronpk/e825cf836d4d80156134 to your computer and use it in GitHub Desktop.
Save aaronpk/e825cf836d4d80156134 to your computer and use it in GitHub Desktop.
the html content of the article has an img tag with a relative URL to "cat.jpg" and there is also a file in the request called "cat.jpg"
POST /micropub HTTP/1.1
Content-type: multipart/form-data; boundary=1884ea44ff5ec7421c3becf56820d9e0
Authorization: Bearer xxxxxxxxxx
--1884ea44ff5ec7421c3becf56820d9e0
Content-Disposition: form-data; name="h"
entry
--1884ea44ff5ec7421c3becf56820d9e0
Content-Disposition: form-data; name="content[html]"
<h2>My Cat</h2><p><img src="cat.jpg"></p>
--1884ea44ff5ec7421c3becf56820d9e0
Content-Disposition: form-data; name="cat.jpg"; filename="/tmp/14987532"
Content-Type: image/jpg
Content-Transfer-Encoding: binary
(binary image data)
--1884ea44ff5ec7421c3becf56820d9e0--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment