mirror of https://github.com/sundowndev/http.git
docs: update internal links (#140)
parent
3c77ecdb06
commit
ecf3fc4a9e
|
@ -9,7 +9,7 @@ category: Getting Started
|
|||
|
||||
Hooks can be used to globally intercept HTTP request and responses. E.g. if you wish to log errors, display a toast on error or need to dynamically modify requests.
|
||||
|
||||
See the [API reference](/api/#hooks) for the list of lifecycle hooks the HTTP module provides
|
||||
See the [API reference](/hooks) for the list of lifecycle hooks the HTTP module provides
|
||||
|
||||
These functions don't have to return anything by default.
|
||||
|
||||
|
|
|
@ -15,12 +15,12 @@ The nuxt-community axios module is still supported and maintained. The HTTP modu
|
|||
|
||||
## Differences
|
||||
|
||||
- There is no scope for [`setHeader`](/api/#setheader), [`setToken`](/api/#settoken)<br/>
|
||||
- There is no scope for [`setHeader`](/helpers#setheader), [`setToken`](/helpers#settoken)<br/>
|
||||
_When calling these methods they apply to the global scope and are used for all future requests_
|
||||
- The axios hooks `onRequestError` and `onResponseError` are unified<br/>
|
||||
_Use the [`onError`](/api/#onerror) hook instead_
|
||||
_Use the [`onError`](/hooks#onerror) hook instead_
|
||||
- The http module does not have a `debug` option like the axios module<br/>
|
||||
_You can setup a basic logger using the [`onRequest`](/api/#onrequest) hook_
|
||||
_You can setup a basic logger using the [`onRequest`](/hooks#onrequest) hook_
|
||||
- Progress bar integration is not supported (for the moment)<br/>
|
||||
_This option may be added again once [`PR #34: Add 'onProgress' option`](https://github.com/sindresorhus/ky/pull/34) for ky is merged_
|
||||
|
||||
|
|
|
@ -35,7 +35,7 @@ Environment variable `API_URL` can be used to **override** `baseURL`.
|
|||
|
||||
<alert type="tip">
|
||||
|
||||
`baseURL` and `proxy` won't work together, you will need to use [`prefix`](/api/#prefix) instead
|
||||
`baseURL` and `proxy` won't work together, you will need to use [`prefix`](/options#prefix) instead
|
||||
|
||||
</alert>
|
||||
|
||||
|
|
|
@ -37,10 +37,10 @@ module.exports = {
|
|||
}
|
||||
```
|
||||
|
||||
See [http's options](/api/#options).
|
||||
See [http's options](/options).
|
||||
|
||||
<alert type="warning">
|
||||
|
||||
Note that this module does not currently support IE 11 because of using [ky](https://github.com/sindresorhus/ky) ([open issue](https://github.com/nuxt/http/issues/126))
|
||||
|
||||
</alert>
|
||||
</alert>
|
||||
|
|
|
@ -7,7 +7,7 @@ category: Getting Started
|
|||
|
||||
## Making Requests
|
||||
|
||||
See the [API reference](/api/#http-methods) for a list of available HTTP methods
|
||||
See the [API reference](/http-methods) for a list of available HTTP methods
|
||||
|
||||
Calling a HTTP methods returns a Promise that resolves to a [Reponse](https://developer.mozilla.org/en-US/docs/Web/API/Response) object or rejects in case of network errors.
|
||||
|
||||
|
|
Loading…
Reference in New Issue