-
Notifications
You must be signed in to change notification settings - Fork 0
/
http.go
29 lines (24 loc) · 995 Bytes
/
http.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
package gohttpclient
// ************************************************************************************************
// ** HTTPClient
// ************************************************************************************************
// ** HTTP client interface
// ************************************************************************************************
type HTTPClient interface {
SetMethod(string)
SetURL(string)
SetPayload(string)
AddHeader(key string, value string)
Do() (HTTPResponse, error)
Reset()
NewTestServer(func(ResponseWriter, Request)) HTTPTestServer
}
// ************************************************************************************************
// ** HTTPTestServer
// ************************************************************************************************
// ** HTTP Test server
// ************************************************************************************************
type HTTPTestServer interface {
GetURL() string
Close()
}