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:
|
||||
|
||||
**nuxt.config.js**
|
||||
|
||||
```js
|
||||
{
|
||||
modules: [
|
||||
'@nuxt/http',
|
||||
],
|
||||
|
||||
```js{}[nuxt.config.js]
|
||||
export default {
|
||||
plugins: [
|
||||
'~/plugins/http'
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
**plugins/http.js**
|
||||
|
||||
```js
|
||||
```js{}[plugins/http.js]
|
||||
import ky from 'ky-universal'
|
||||
|
||||
export default function ({ $http }) {
|
||||
|
|
Loading…
Reference in New Issue