Skip to content

Axios REST client - find() does not pass headers, all others (get, create, removed) does #2798

Answered by daffl
SharpBCD asked this question in Q&A
Discussion options

You must be logged in to vote

The correct method call is

const sr = await this.$restApi.service('users').find({
  headers: {
    accesstoken: '-this is a new token-'
  }
})

You passed an empty object as the first argument which already is the params object for find calls.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@SharpBCD
Comment options

Answer selected by SharpBCD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2770 on October 14, 2022 04:16.