1.1.0 • Published 6 years ago
gogetter v1.1.0
Classes
Functions
GoGetter
The GoGetter class exposes methods for GET, POST, PUT, DELETE
Kind: global class
Hideconstructor:
Since: 1.0.0
- GoGetter
- new GoGetter(method)
- .get(uri, [options]) ⇒ Promise
- .post(uri, body, [options]) ⇒ Promise
- .put(uri, body, [options]) ⇒ Promise
- .delete(uri, [options]) ⇒ Promise
new GoGetter(method)
Exposes GoGetter request methods
Param | Type |
---|---|
method | string |
GoGetter.get(uri, options) ⇒ Promise
Kind: static method of GoGetter
Param | Type |
---|---|
uri | string |
options | Object |
options.timeout | number |
options.headers | Object |
GoGetter.post(uri, body, options) ⇒ Promise
Kind: static method of GoGetter
Param | Type |
---|---|
uri | string |
body | Object | string |
options | Object |
options.timeout | number |
options.headers | Object |
GoGetter.put(uri, body, options) ⇒ Promise
Kind: static method of GoGetter
Param | Type |
---|---|
uri | string |
body | Object | string |
options | Object |
options.timeout | number |
options.headers | Object |
GoGetter.delete(uri, options) ⇒ Promise
Kind: static method of GoGetter
Param | Type |
---|---|
uri | string |
options | Object |
options.timeout | number |
options.headers | Object |
XHR
Generate an XHR of type GET, POST, PUT, DELETE
Kind: global class
Since: 1.0.0
- XHR
- new XHR(method)
- .body(message) ⇒ XHR
- .uri(url) ⇒ XHR
- .headers(header) ⇒ XHR
- .timeout(time) ⇒ XHR
- .send() ⇒ Promise
new XHR(method)
Manages XHRs
Param | Type |
---|---|
method | string |
xhR.body(message) ⇒ XHR
Update body for request
Kind: instance method of XHR
Param | Type |
---|---|
message | Object | string |
xhR.uri(url) ⇒ XHR
Update uri for request
Kind: instance method of XHR
Param | Type |
---|---|
url | string |
xhR.headers(header) ⇒ XHR
Update headers for request
Kind: instance method of XHR
Param | Type |
---|---|
header | Object |
xhR.timeout(time) ⇒ XHR
Update timeout for request
Kind: instance method of XHR
Param | Type |
---|---|
time | number |
xhR.send() ⇒ Promise
Make XHR request
Kind: instance method of XHR
win() ⇒ Window | Object
Returns window, global, or object if exists (in that order);
Kind: global function
Since: 1.0.0