Versions in this module Expand all Collapse all v0 v0.1.0 Sep 3, 2015 Changes in this version + func GetJSONInput(r *http.Request, w http.ResponseWriter, v interface{}) (err error) + func OutputJSON(w http.ResponseWriter, v interface{}) (err error) + type BasicAuthentication struct + Password string + User string + type FormDataPayload struct + Files []keyValuePair + ReadClosers []keyNameRC + Values []keyValuePair + func NewFormDataPayload() *FormDataPayload + func (f *FormDataPayload) AddFile(key, file string) + func (f *FormDataPayload) AddReadCloser(key, name string, rc io.ReadCloser) + func (f *FormDataPayload) AddValue(key, value string) + func (f *FormDataPayload) GetContentType() string + func (f *FormDataPayload) GetPayloadBuffer() (*bytes.Buffer, error) + type HTTPRequest struct + BasicAuthPassword string + BasicAuthUser string + Client *http.Client + Headers map[string]string + Parameters map[string][]string + URL string + func NewHTTPRequest(url string) *HTTPRequest + func (r *HTTPRequest) AddHeader(name, value string) + func (r *HTTPRequest) AddParameter(name, value string) + func (r *HTTPRequest) GetResponseFromJSON(v interface{}) error + func (r *HTTPRequest) MakeDeleteRequest() (*HTTPResponse, error) + func (r *HTTPRequest) MakeGetRequest() (*HTTPResponse, error) + func (r *HTTPRequest) MakePostRequest(payload Payload) (*HTTPResponse, error) + func (r *HTTPRequest) MakePutRequest(payload Payload) (*HTTPResponse, error) + func (r *HTTPRequest) MakeRequest(method string, payload Payload) (*HTTPResponse, error) + func (r *HTTPRequest) PostResponseFromJSON(payload Payload, v interface{}) error + func (r *HTTPRequest) SetBasicAuth(user, password string) + func (r *HTTPRequest) SetClient(c *http.Client) + type HTTPResponse struct + Code int + Data []byte + func (r *HTTPResponse) ParseFromJSON(v interface{}) error + func (r *HTTPResponse) ParseFromXML(v interface{}) error + type Payload interface + GetContentType func() string + GetPayloadBuffer func() (*bytes.Buffer, error) + type RawPayload struct + Data []byte + func NewRawPayload(data []byte) *RawPayload + func (r *RawPayload) GetContentType() string + func (r *RawPayload) GetPayloadBuffer() (*bytes.Buffer, error) + type Request struct + Authentication BasicAuthentication + Data []byte + Url string + UserAgent string + func (r Request) Delete() (int, []byte, error) + func (r Request) Get() (int, []byte, error) + func (r Request) Post() (int, []byte, error) + func (r Request) Put() (int, []byte, error) + type UrlEncodedPayload struct + Values []keyValuePair + func NewUrlEncodedPayload() *UrlEncodedPayload + func (f *UrlEncodedPayload) AddValue(key, value string) + func (f *UrlEncodedPayload) GetContentType() string + func (f *UrlEncodedPayload) GetPayloadBuffer() (*bytes.Buffer, error)