mirror of https://github.com/sundowndev/http.git
docs: improve content
parent
2a0161a7c1
commit
bb1014d6af
|
@ -17,23 +17,15 @@ These functions don't have to return anything by default.
|
||||||
|
|
||||||
For registering hooks, you have to create a nuxt plugin:
|
For registering hooks, you have to create a nuxt plugin:
|
||||||
|
|
||||||
**nuxt.config.js**
|
```js{}[nuxt.config.js]
|
||||||
|
export default {
|
||||||
```js
|
|
||||||
{
|
|
||||||
modules: [
|
|
||||||
'@nuxt/http',
|
|
||||||
],
|
|
||||||
|
|
||||||
plugins: [
|
plugins: [
|
||||||
'~/plugins/http'
|
'~/plugins/http'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
**plugins/http.js**
|
```js{}[plugins/http.js]
|
||||||
|
|
||||||
```js
|
|
||||||
import ky from 'ky-universal'
|
import ky from 'ky-universal'
|
||||||
|
|
||||||
export default function ({ $http }) {
|
export default function ({ $http }) {
|
||||||
|
|
Loading…
Reference in New Issue