Giter Club home page Giter Club logo

Comments (8)

tmikaeld avatar tmikaeld commented on May 28, 2024

I could solve it by setting a global setting for vue-resource.

Vue.http.headers.common['Authorization'] = $.cookie('access_token');

But it would be great if this could be passed correctly to vuetable instead.

from vue-table.

ratiw avatar ratiw commented on May 28, 2024

@tmikaeld According to vue-resource doc, it is supposed to be and Object, not an Array.

  <vuetable
     //...
     :http-options="options"
  ></vuetable>
  new Vue({
    el: 'body',
    data: {
      options: {
        headers: {
          "Authorization": $.cookie('access_token')
        }
      }
    }
  })

from vue-table.

tmikaeld avatar tmikaeld commented on May 28, 2024

If i set it up exactly like that, it is created as a query string in the request rather than a header.

screen shot 2016-07-27 at 16 13 42

from vue-table.

ratiw avatar ratiw commented on May 28, 2024

@tmikaeld I didn't really use this feature myself, so I'm not sure what happens.

Can you please give me and example on how it should actually look in the request? May be I can check and do something with it.

from vue-table.

tmikaeld avatar tmikaeld commented on May 28, 2024

Nevermind, it was me who mistakenly had not changed http-data to http-options!

from vue-table.

abishekrsrikaanth avatar abishekrsrikaanth commented on May 28, 2024

@tmikaeld, could you give us a code snippet on how you finally solved this?

from vue-table.

tmikaeld avatar tmikaeld commented on May 28, 2024

@abishekrsrikaanth Just change :http-data="options" to :http-options="options"

from vue-table.

abishekrsrikaanth avatar abishekrsrikaanth commented on May 28, 2024

@tmikaeld , thank you. much appreciated

from vue-table.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.