Documentation
¶
Index ¶
- func AllowMethod(expect string, got string) bool
- func BindBody(c *gin.Context, d interface{}) error
- func BodyToQuery(data string) string
- func GetRequestArgs(c *gin.Context, d interface{}) error
- func HTTPRequest(reqURL, method, data string, header http.Header, owner string) (string, *http.Response, error)
- func IsQueryMethod(method string) bool
- func MakeRefer(req *http.Request) string
- func ObjectBodyToQuery(d interface{}) string
- func QueryToBody(query url.Values, pretty bool) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowMethod ¶
AllowMethod check if http method of request is allow
func BodyToQuery ¶
BodyToQuery convert a JSON body to http GET query parameter
func GetRequestArgs ¶
GetRequestArgs get request args
func HTTPRequest ¶
func HTTPRequest(reqURL, method, data string, header http.Header, owner string) (string, *http.Response, error)
HTTPRequest implements general http request methods, and return the response string body BUG: return (string, http.Header, error) run fail
func IsQueryMethod ¶
IsQueryMethod check if http method is query
func ObjectBodyToQuery ¶
func ObjectBodyToQuery(d interface{}) string
ObjectBodyToQuery convert a JSON body to http GET query parameter
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.