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

Update for API v1

James Hillyerd
2016-02-25 19:30:51 -08:00
parent 4ff8d3f43e
commit 26cad281be

@@ -4,7 +4,7 @@ Retrieve message body
### URI
`GET /mailbox/{name}/{id}`
`GET /api/v1/mailbox/{name}/{id}`
### Params
@@ -13,13 +13,13 @@ 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))
* The Inbucket version of the message headers (same as returned by [GET /api/v1/mailbox/{name}](https://github.com/jhillyerd/inbucket/wiki/REST-GET-mailbox))
* The parsed SMTP headers (not converted to UTF-8)
* The decoded Text and HTML portions of the MIME body of the email
### Example
Request: `curl -i -H "Accept: application/json" http://localhost:9000/mailbox/swaks/20131016T164638-0001`
Request: `curl -i -H "Accept: application/json" http://localhost:9000/api/v1/mailbox/swaks/20131016T164638-0001`
Response: (JSON reformatted for readability)
@@ -30,17 +30,17 @@ Response: (JSON reformatted for readability)
Date: Thu, 17 Oct 2013 21:51:59 GMT
{
"Mailbox": "swaks",
"Id": "20131016T164638-0001",
"From": "jamehi03@server.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: [...]"
"mailbox": "swaks",
"id": "20131016T164638-0001",
"from": "jamehi03@server.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": {
"header": {
"Content-Type": [
"multipart/alternative; boundary=\"----=_MIME_BOUNDARY_000_62717\""
],