func (c *Client) ListMailbox(name string) (headers []*MessageHeader, err error) {
	uri := "/api/v1/mailbox/" + url.QueryEscape(name)
	err = c.doJSON("GET", uri, &headers)
	if err != nil {
		return nil, err
	}
	for _, h := range headers {
		h.client = c
	}
	return
}
ListMailbox returns a list of messages for the requested mailbox
package client
import (
	"bytes"
	"fmt"
	"net/http"
	"net/url"
	"time"
	"github.com/inbucket/inbucket/pkg/rest/model"
)
type Client struct {
	restClient
}
func New(baseURL string) (*Client, error) {
	parsedURL, err := url.Parse(baseURL)
	if err != nil {
		return nil, err
	}
	c := &Client{
		restClient{
			client: &http.Client{
				Timeout: 30 * time.Second,
			},
			baseURL: parsedURL,
		},
	}
	return c, nil
}