Documentation ¶
Index ¶
- Constants
- func JSONMarshal(v interface{}, unescape bool) ([]byte, error)
- type Agent
- func (a *Agent) BasicAuthDel() *Agent
- func (a *Agent) BasicAuthSet(user, password string) *Agent
- func (a *Agent) Bytes() (int, []byte, error)
- func (a *Agent) ClearError() *Agent
- 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
- type File
- type RequestProcessor
- type RequestProcessorDeferHandler
- type ResponseProcessor
Constants ¶
View Source
const ( POST = "POST" GET = "GET" HEAD = "HEAD" PUT = "PUT" DELETE = "DELETE" PATCH = "PATCH" )
View Source
const CIPHER_HEADER = "X-CIPHER-ENCODED"
Variables ¶
This section is empty.
Functions ¶
func JSONMarshal ¶
Types ¶
type Agent ¶
type Agent struct { Error error // contains filtered or unexported fields }
func (*Agent) BasicAuthDel ¶
func (*Agent) BasicAuthSet ¶
func (*Agent) ClearError ¶ added in v0.9.2
func (*Agent) ContentType ¶
func (*Agent) ContextJSON ¶
func (*Agent) ContextJSONPB ¶
func (*Agent) ContextStatus ¶
func (*Agent) ContextXML ¶
func (*Agent) GetHeadOut ¶
func (*Agent) RequestProcessor ¶
func (a *Agent) RequestProcessor(processor RequestProcessor) *Agent
func (*Agent) ResponseProcessor ¶
func (a *Agent) ResponseProcessor(processor ResponseProcessor) *Agent
func (*Agent) SetHttpClient ¶
type File ¶
func NewFileByBytes ¶
type RequestProcessor ¶
type RequestProcessorDeferHandler ¶ added in v0.9.1
type RequestProcessorDeferHandler func()
Click to show internal directories.
Click to hide internal directories.