Documentation ¶
Index ¶
- type Auth
- type BasicAuth
- type Client
- func (c *Client) Do(httpMethod, frappeMethod string, params url.Values, headers http.Header) (HTTPResponse, error)
- func (c *Client) DoJSON(httpMethod, frappeMethod string, params url.Values, headers http.Header, ...) (HTTPResponse, error)
- func (c *Client) DoRaw(httpMethod, frappeMethod string, reqBody []byte, headers http.Header) (HTTPResponse, error)
- func (c *Client) Login() error
- func (c *Client) SetHTTPClient(h *http.Client)
- type HTTPClient
- type HTTPResponse
- type LoginAuth
- type TokenAuth
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client refers to frappe client
func (*Client) Do ¶
func (c *Client) Do(httpMethod, frappeMethod string, params url.Values, headers http.Header) (HTTPResponse, error)
Do proxy underlying http client do request
func (*Client) DoJSON ¶
func (c *Client) DoJSON(httpMethod, frappeMethod string, params url.Values, headers http.Header, obj interface{}) (HTTPResponse, error)
DoJSON proxy underlying http client doJSON request
func (*Client) DoRaw ¶
func (c *Client) DoRaw(httpMethod, frappeMethod string, reqBody []byte, headers http.Header) (HTTPResponse, error)
DoRaw proxy underlying http client do request
func (*Client) SetHTTPClient ¶
SetHTTPClient sets http client for frappe client
type HTTPClient ¶
type HTTPClient interface { Do(method, rURL string, params url.Values, headers http.Header) (HTTPResponse, error) DoRaw(method, rURL string, reqBody []byte, headers http.Header) (HTTPResponse, error) DoJSON(method, rURL string, params url.Values, headers http.Header, obj interface{}) (HTTPResponse, error) GetClient() *httpClient }
HTTPClient represents an HTTP client.
func NewHTTPClient ¶
NewHTTPClient returns a self-contained HTTP request object with underlying keep-alive transport.
type HTTPResponse ¶
HTTPResponse encompasses byte body + the response of an HTTP request.
Click to show internal directories.
Click to hide internal directories.