Documentation ¶
Index ¶
Constants ¶
View Source
const ( Get string = "GET" Post string = "POST" Put string = "PUT" Patch string = "PATCH" Delete string = "DELETE" )
Supported http methods
Variables ¶
This section is empty.
Functions ¶
func AddParameters ¶
AddParameters adds query parameters to the URL.
func BuildHTTPRequest ¶
BuildHTTPRequest build a http request object
Types ¶
type Request ¶
type Request struct { User string Password string Method string URL string Header map[string]string Params map[string]string Body []byte }
Request request info
func NewRequest ¶
func NewRequest(url, method string, header map[string]string, params map[string]string, data []byte) *Request
NewRequest return Request
func (*Request) SetBasicAuth ¶
SetBasicAuth set basic auth of request
Click to show internal directories.
Click to hide internal directories.