Versions in this module Expand all Collapse all v0 v0.9.2 Apr 15, 2019 Changes in this version type Agent + func (a *Agent) ClearError() *Agent v0.9.1 Feb 20, 2019 Changes in this version + type RequestProcessorDeferHandler func() v0.9.0 Feb 20, 2019 Changes in this version + const CIPHER_HEADER + const DELETE + const GET + const HEAD + const PATCH + const POST + const PUT + func JSONMarshal(v interface{}, unescape bool) ([]byte, error) + type Agent struct + Error error + func Get(aurl string) *Agent + func HTTP(host string) *Agent + func HTTPs(host string) *Agent + func Head(aurl string) *Agent + func Patch(aurl string) *Agent + func Post(aurl string) *Agent + func Put(aurl string) *Agent + func URL(aurl string) *Agent + func (a *Agent) BasicAuthDel() *Agent + func (a *Agent) BasicAuthSet(user, password string) *Agent + func (a *Agent) Bytes() (int, []byte, error) + func (a *Agent) ContentType(t string) *Agent + func (a *Agent) ContextBytes(ctx context.Context) (int, []byte, error) + func (a *Agent) ContextJSON(ctx context.Context, obj interface{}) (int, error) + func (a *Agent) ContextJSONPB(ctx context.Context, obj proto.Message) (int, error) + func (a *Agent) ContextStatus(ctx context.Context) (int, string, error) + func (a *Agent) ContextText(ctx context.Context) (int, string, error) + func (a *Agent) ContextXML(ctx context.Context, obj interface{}) (int, error) + func (a *Agent) CookiesAdd(cookies ...*http.Cookie) *Agent + func (a *Agent) Debug(flag bool) *Agent + func (a *Agent) Do(ctx context.Context) (*http.Response, error) + func (a *Agent) FileData(files ...*File) *Agent + func (a *Agent) FormData(form map[string][]string) *Agent + func (a *Agent) Fragment(value string) *Agent + func (a *Agent) GetHeadIn() http.Header + func (a *Agent) GetHeadOut() http.Header + func (a *Agent) HeadAdd(key string, value string) *Agent + func (a *Agent) HeadDel(key string) *Agent + func (a *Agent) HeadSet(key string, value string) *Agent + func (a *Agent) JSON(obj interface{}) (int, error) + func (a *Agent) JSONData(args ...interface{}) *Agent + func (a *Agent) JSONPB(obj proto.Message) (int, error) + func (a *Agent) Method(m string) *Agent + func (a *Agent) PBData(obj proto.Message) *Agent + func (a *Agent) Prefix(prefix string) *Agent + func (a *Agent) QueryAdd(key string, value string) *Agent + func (a *Agent) QueryDel(key string) *Agent + func (a *Agent) QueryGet() url.Values + func (a *Agent) QuerySet(key string, value string) *Agent + func (a *Agent) RequestProcessor(processor RequestProcessor) *Agent + func (a *Agent) ResponseProcessor(processor ResponseProcessor) *Agent + func (a *Agent) SetCipher(cipher Cipher) *Agent + func (a *Agent) SetHead(hdr http.Header) *Agent + func (a *Agent) SetHttpClient(client *http.Client) + func (a *Agent) Status() (int, string, error) + func (a *Agent) Text() (int, string, error) + func (a *Agent) Transport(tr http.RoundTripper) *Agent + func (a *Agent) URI(uri string) *Agent + func (a *Agent) XML(obj interface{}) (int, error) + func (a *Agent) XMLData(obj interface{}) *Agent + type Cipher interface + Decrypt func([]byte) ([]byte, error) + Encrypt func([]byte) ([]byte, error) + type File struct + Data []byte + Fieldname string + Filename string + func NewFile(field string, filename string) (*File, error) + func NewFileByBytes(field string, filename string, data []byte) (*File, error) + func NewFileByReader(field string, filename string, rd io.Reader) (*File, error) + type RequestProcessor func(*http.Request) (*http.Request, error) + type ResponseProcessor func(*http.Response) (*http.Response, error)