1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 09:37:02 +00:00

Updated REST GET message (markdown)

James Hillyerd
2013-10-17 14:51:06 -07:00
parent c5a4656ea1
commit 01af1b8c61

@@ -13,7 +13,9 @@ Retrieve message body
### Output
The Inbucket version of the message headers (same as returned by [GET /mailbox/{name}](https://github.com/jhillyerd/inbucket/wiki/REST-GET-mailbox)), plus the Text and HTML portions of the MIME body of the email.
* The Inbucket version of the message headers (same as returned by [GET /mailbox/{name}](https://github.com/jhillyerd/inbucket/wiki/REST-GET-mailbox))
* The decoded Text and HTML portions of the MIME body of the email
* The parsed SMTP headers (not converted to UTF-8)
### Example
@@ -22,16 +24,33 @@ Request: `curl -i -H "Accept: application/json" http://localhost:9000/mailbox/sw
Response: (JSON reformatted for readability)
{
"Body":{
"Text":"This is a test mailing.\r\n\r\nThis should be clickable: http://google.com/\r\n",
"Html":"\u003chtml\u003e\n\u003cbody\u003e\n\u003cp\u003eThis is a test mailing [...]"
},
"Header":{
"Mailbox":"swaks",
"Id":"20131016T164638-0001",
"From":"jamehi03@server.com",
"Subject":"Swaks HTML",
"Date":"2013-10-16T16:46:38.646370568-07:00",
"Size":705
}
"Mailbox": "swaks",
"Id": "20131016T164638-0001",
"From": "jamehi03@jamehi03lx.noa.com",
"Subject": "Swaks HTML",
"Date": "2013-10-16T16:46:38.646370568-07:00",
"Size": 705,
"Body": {
"Text": "This is a test mailing.\r\n\r\nThis should be clickable: http://google.com/\r\n",
"Html": "<html>\n<body>\n<p>This is a test mailing <b>in HTML</b></p>\n\n<p>This should be clickable: [...]" },
"Header": {
"Content-Type": [
"multipart/alternative; boundary=\"----=_MIME_BOUNDARY_000_62717\""
],
"Date": [
"Wed, 16 Oct 2013 16:46:38 -0700"
],
"From": [
"jamehi03@jamehi03lx.noa.com"
],
"Mime-Version": [
"1.0"
],
"Subject": [
"Swaks HTML"
],
"To": [
"swaks@inbucket.local"
]
}
}