From 9480446f13c432d652d76b988f9b065ccfb23f13 Mon Sep 17 00:00:00 2001 From: James Hillyerd Date: Wed, 16 Oct 2013 16:56:47 -0700 Subject: [PATCH] Created REST GET message (markdown) --- REST-GET-message.md | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 REST-GET-message.md diff --git a/REST-GET-message.md b/REST-GET-message.md new file mode 100644 index 0000000..e56a5e3 --- /dev/null +++ b/REST-GET-message.md @@ -0,0 +1,37 @@ +[Back to REST API](https://github.com/jhillyerd/inbucket/wiki/REST-API) + +Retrieve message body + +### URI + +`GET /mailbox/{name}/{id}` + +### Params + +* `name` - name of the mailbox the message belongs to +* `id` - identifier of the message to retrieve + +### Output + +The Inbucket version of the message headers, plus the Text and HTML portions of the MIME body of the email. + +### Example + +Request: `curl -i -H "Accept: application/json" http://localhost:9000/mailbox/swaks/20131015T161202-0000` + +Response: + + HTTP/1.1 200 OK + Content-Type: text/plain + Content-Length: 264 + Date: Tue, 15 Oct 2013 23:52:09 GMT + + Date: Tue, 15 Oct 2013 16:12:02 -0700 + To: swaks@inbucket.local + From: jamehi03@server.com + Subject: Swaks Plain Text + X-Mailer: swaks v20130209.0 jetmore.org/john/code/swaks/ + + This is a test mailing. + + This should be clickable: http://google.com/