nuxt / http

Universal HTTP Module for Nuxt.js
https://http.nuxtjs.org
MIT License
229 stars 51 forks source link

Docs example for setToken with request type #95

Closed csheppard closed 4 years ago

csheppard commented 4 years ago

Version

v0.5.0

Reproduction link

https://http.nuxtjs.org/guide/advanced.html#settoken-token-type

Steps to reproduce

The example in the docs shows you can set it by request type but the functionality doesn't exist. Planned for future perhaps?

// Adds header: `Authorization: Bearer 123` to only post and delete requests
this.$http.setToken('123', 'Bearer', ['post', 'delete'])

What is expected ?

Set token by request type

What is actually happening?

Not possible