func (r *SimpleHTTPRequest) SetBasicAuth(user, password string) {
	r.BasicAuthUser = user
	r.BasicAuthPassword = password
}
Sets username and password for basic authentication.
package simplehttp
import (
	"bytes"
	"encoding/json"
	"encoding/xml"
	"io"
	"io/ioutil"
	"net/http"
	"net/url"
)
type SimpleHTTPRequest struct {
	Method            string
	URL               string
	Parameters        map[string][]string
	FormValues        map[string][]string
	Headers           map[string]string
	BasicAuthUser     string
	BasicAuthPassword string
	LastResponseCode int
	LastRawResponse  []byte
}
func NewSimpleHTTPRequest(method, url string) *SimpleHTTPRequest {
	return &SimpleHTTPRequest{Method: method, URL: url}
}
func NewGetRequest(url string) *SimpleHTTPRequest {
	return NewSimpleHTTPRequest("GET", url)
}
func NewPostRequest(url string) *SimpleHTTPRequest {
	return NewSimpleHTTPRequest("POST", url)
}
func NewDeleteRequest(url string) *SimpleHTTPRequest {
	return NewSimpleHTTPRequest("DELETE", url)
}
func (r *SimpleHTTPRequest) AddParameter(name, value string) {
	if r.Parameters == nil {
		r.Parameters = make(map[string][]string)
	}
	r.Parameters[name] = append(r.Parameters[name], value)
}
func (r *SimpleHTTPRequest) AddFormValue(name, value string) {
	if r.FormValues == nil {
		r.FormValues = make(map[string][]string)
	}
	r.FormValues[name] = append(r.FormValues[name], value)
}
func (r *SimpleHTTPRequest) AddHeader(name, value string) {
	if r.Headers == nil {
		r.Headers = make(map[string]string)
	}
	r.Headers[name] = value
}