Skip to content
This repository was archived by the owner on Dec 1, 2023. It is now read-only.

Commit 78f5e05

Browse files
author
Steffan
committed
update docs
1 parent db0fd2d commit 78f5e05

File tree

2 files changed

+17
-17
lines changed

2 files changed

+17
-17
lines changed

docs/api.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
```js
66
{
77
// Constructor
8-
constructor(object: options)
8+
constructor(object: config)
99

1010
// Properties
1111
url (string)
@@ -23,7 +23,7 @@
2323
// Methods
2424
getUrl() (string)
2525
getBody() (any)
26-
respondWith(any: body, object: options) (Response)
26+
respondWith(any: body, object: config) (Response)
2727
abort()
2828
}
2929
```

docs/http.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,24 @@ Shortcut methods are available for all request types. These methods work globall
2323

2424
```js
2525
// global Vue object
26-
Vue.http.get('/someUrl', [options]).then(successCallback, errorCallback);
27-
Vue.http.post('/someUrl', [body], [options]).then(successCallback, errorCallback);
26+
Vue.http.get('/someUrl', [config]).then(successCallback, errorCallback);
27+
Vue.http.post('/someUrl', [body], [config]).then(successCallback, errorCallback);
2828

2929
// in a Vue instance
30-
this.$http.get('/someUrl', [options]).then(successCallback, errorCallback);
31-
this.$http.post('/someUrl', [body], [options]).then(successCallback, errorCallback);
30+
this.$http.get('/someUrl', [config]).then(successCallback, errorCallback);
31+
this.$http.post('/someUrl', [body], [config]).then(successCallback, errorCallback);
3232
```
3333
List of shortcut methods:
3434

35-
* `get(url, [options])`
36-
* `head(url, [options])`
37-
* `delete(url, [options])`
38-
* `jsonp(url, [options])`
39-
* `post(url, [body], [options])`
40-
* `put(url, [body], [options])`
41-
* `patch(url, [body], [options])`
35+
* `get(url, [config])`
36+
* `head(url, [config])`
37+
* `delete(url, [config])`
38+
* `jsonp(url, [config])`
39+
* `post(url, [body], [config])`
40+
* `put(url, [body], [config])`
41+
* `patch(url, [body], [config])`
4242

43-
## Options
43+
## Config
4444

4545
Parameter | Type | Description
4646
--------- | ---- | -----------
@@ -52,11 +52,11 @@ method | `string` | HTTP method (e.g. GET, POST, ...)
5252
responseType | `string` | Type of the response body (e.g. text, blob, json, ...)
5353
timeout | `number` | Request timeout in milliseconds (`0` means no timeout)
5454
credentials | `boolean` | Indicates whether or not cross-site Access-Control requests should be made using credentials
55-
before | `function(request)` | Callback function to modify the request options before it is sent
56-
uploadProgress | `function(event)` | Callback function to handle the [ProgressEvent](https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent) of uploads
57-
downloadProgress | `function(event)` | Callback function to handle the [ProgressEvent](https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent) of downloads
5855
emulateHTTP | `boolean` | Send PUT, PATCH and DELETE requests with a HTTP POST and set the `X-HTTP-Method-Override` header
5956
emulateJSON | `boolean` | Send request body as `application/x-www-form-urlencoded` content type
57+
before | `function(request)` | Callback function to modify the request object before it is sent
58+
uploadProgress | `function(event)` | Callback function to handle the [ProgressEvent](https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent) of uploads
59+
downloadProgress | `function(event)` | Callback function to handle the [ProgressEvent](https://developer.mozilla.org/en-US/docs/Web/API/ProgressEvent) of downloads
6060

6161
## Response
6262

0 commit comments

Comments
 (0)