Documentation ¶
Index ¶
- Constants
- type Client
- func (cli *Client) Always(cb func(*Response)) *Client
- func (cli *Client) Do(req *Request) *Client
- func (cli *Client) Done(cb func(*Response)) *Client
- func (cli *Client) Fail(cb func(*Response)) *Client
- func (cli *Client) JSValue() js.Value
- func (cli *Client) LastErr() error
- func (cli *Client) Progress(cb func(int, int, bool)) *Client
- func (cli *Client) ReadyState() State
- type Request
- type Response
- type State
Constants ¶
View Source
const ( TextType string = "text/plain" JSONType string = "application/json" StreamType string = "application/octet-stream" )
content types
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client ...
func (*Client) ReadyState ¶
ReadyState https://developer.mozilla.org/en-US/docs/Web/API/XMLHttpRequest/readyState
type Request ¶
type Request struct {
// contains filtered or unexported fields
}
Request ...
func NewRequest ¶
NewRequest returns a request.
Click to show internal directories.
Click to hide internal directories.