-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy pathdefault_client.go
39 lines (35 loc) · 1.17 KB
/
default_client.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright 2014-2019 Liu Dong <[email protected]>.
// Licensed under the MIT license.
// Powerful and easy to use http client
package httpclient
import "sync"
// The default client for convenience
var defaultClient = &HttpClient{
reuseTransport: true,
reuseJar: true,
lock: new(sync.Mutex),
}
var Defaults = defaultClient.Defaults
var Begin = defaultClient.Begin
var Do = defaultClient.Do
var Get = defaultClient.Get
var Delete = defaultClient.Delete
var Head = defaultClient.Head
var Post = defaultClient.Post
var PostJson = defaultClient.PostJson
var PostMultipart = defaultClient.PostMultipart
var Put = defaultClient.Put
var PutJson = defaultClient.PutJson
var PatchJson = defaultClient.PatchJson
var Options = defaultClient.Options
var Connect = defaultClient.Connect
var Trace = defaultClient.Trace
var Patch = defaultClient.Patch
var WithOption = defaultClient.WithOption
var WithOptions = defaultClient.WithOptions
var WithHeader = defaultClient.WithHeader
var WithHeaders = defaultClient.WithHeaders
var WithCookie = defaultClient.WithCookie
var Cookies = defaultClient.Cookies
var CookieValues = defaultClient.CookieValues
var CookieValue = defaultClient.CookieValue