Documentation
¶
Index ¶
- Variables
- func DefaultTimeoutClient() *http.Client
- func DigestAuthParams(r *http.Response) map[string]string
- func H(data string, encryptionType string) string
- func MD5(data string) string
- func NewTimeoutClient(cTimeout time.Duration, rwTimeout time.Duration) *http.Client
- func RandomKey() string
- func Request(method, url string, reqBody []byte, pHeaders map[string]string, ...) (*http.Response, error)
- func SHA256(data string) string
- func SendSoap(httpClient *http.Client, endpoint, message string, username, password string, ...) (*http.Response, error)
- type RestClientAuth
- type RestResponse
- func Auth(username string, password string, url, uri string, method string, ...) RestResponse
- func NewRestResponse(body []byte, code int, err error) RestResponse
- func NewRestResponseEx(body []byte, code int, err error, req string) RestResponse
- func SendSoapEx(endpoint, message string, username, password string, urlType string, ...) RestResponse
- type Transport
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DefaultTimeoutClient ¶ added in v0.1.2
func DigestAuthParams ¶ added in v0.1.2
Parse Authorization header from the http.Request. Returns a map of auth parameters or nil if the header is not a valid parsable Digest auth header.
func NewTimeoutClient ¶ added in v0.1.2
apps will set three OS variables:
Types ¶
type RestClientAuth ¶ added in v0.1.2
type RestClientAuth struct {
// contains filtered or unexported fields
}
func (*RestClientAuth) Request ¶ added in v0.1.2
func (this *RestClientAuth) Request(method string, url string, reqBody []byte, headers map[string]string, timeout time.Duration, encryptionType string) RestResponse
func (*RestClientAuth) SetAuth ¶ added in v0.1.2
func (this *RestClientAuth) SetAuth(user, pwd string)
type RestResponse ¶ added in v0.1.2
func NewRestResponse ¶ added in v0.1.2
func NewRestResponse(body []byte, code int, err error) RestResponse
func NewRestResponseEx ¶ added in v0.1.2
func NewRestResponseEx(body []byte, code int, err error, req string) RestResponse
func SendSoapEx ¶ added in v0.1.2
func SendSoapEx(endpoint, message string, username, password string, urlType string, encryptionType string) RestResponse
// SendSoap send soap message
type Transport ¶ added in v0.0.9
type Transport struct { Username string Password string Transport http.RoundTripper }
Transport is an implementation of http.RoundTripper that takes care of http digest authentication.
func NewTransport ¶ added in v0.0.9
NewTransport creates a new digest transport using the http.DefaultTransport.
Click to show internal directories.
Click to hide internal directories.