No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Tags
    3. axios
    Log in to post
    • M

      Unable to use this.$axios in Vuex: TS2339: Property '$axios' does not exist on type 'Store '.
      Framework • axios typescript vuex • • Maxiride

      11
      0
      Votes
      11
      Posts
      2421
      Views

      Hawkeye64

      @ytsejam

      I think it is used as “this._vm.axios”, but did not work for me I have found this boot solution.

      For one thing, you would need to access it as: this._vm.$axios because you put a $ in front on the prototype definition
      Second, I don’t know how you are writing your functions but the this will be inforrect if you used fat arrow (=>) – they need to be functions for this to be referencing the store.

    • R

      Boot file: how to 'wait' for $axios and cordova plugin to be available?
      Help • axios boot cordova plugins • • realtebo

      3
      0
      Votes
      3
      Posts
      273
      Views

      metalsadman

      @realtebo they are available when your app is created.

    • O

      Call a function when the Loading Bar is displayed / hidden
      Framework • axios button loading-bar • • Oxi

      2
      0
      Votes
      2
      Posts
      290
      Views

      O

      I figured it out myself 🙂

      The Ajax-Bar had to be integrated and the event had to be written in it.

      https://quasar.dev/start/how-to-use-vue#Handling-Vue-Events
      https://quasar.dev/vue-components/ajax-bar#Usage

    • A

      Am I doing something wrong with axios?
      Framework • axios • • amoss

      8
      0
      Votes
      8
      Posts
      1431
      Views

      A

      OK, as I thought, the problem was not CORS. The following is working as expected

      axios.post(this.serverUrl, null, {data: {version: "0.1b", command: "test", data: JSON.stringify(this.user.info)}, transformRequest: [(data, headers) => {return qs.stringify(data);}], headers: { 'Content-Type': 'application/x-www-form-urlencoded' }}

      this.user.info = [{name: “blah”, age: 30}, {name: “blah2”, age: 50}]

    • A

      Using Axios
      Framework • api axios rest • • amoss

      3
      0
      Votes
      3
      Posts
      310
      Views

      A

      Thank you very much!