Documentation ¶
Overview ¶
Package myhttp contains an http connection
Package myhttp contains an http connection
Index ¶
- func GetMyClient() *http.Client
- func IsJSONArray(body []byte) bool
- func IsJSONMap(body []byte) bool
- func NewGetRequest(url string) (*http.Request, error)
- func NewPostRequest(url string, formData url.Values) (*http.Request, error)
- func SetAcceptJSONHeader(req *http.Request)
- func SetTokenHeader(req *http.Request, accessToken string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsJSONArray ¶
IsJSONArray is funtion to check json data whether it is array
func NewGetRequest ¶
NewGetRequest is function to create Get request
func NewPostRequest ¶
NewPostRequest is function to create Post request
func SetAcceptJSONHeader ¶
SetAcceptJSONHeader is function to set accept JSON header
func SetTokenHeader ¶
SetTokenHeader is function to set Authorization token
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.