n1crack / vuefinder

Empower your Vue.js applications with this versatile and customizable file manager component, simplifying file organization and navigation.
https://vuefinder.ozdemir.be
MIT License
259 stars 75 forks source link

Multiple data sending issue #9

Closed vivekmattu002 closed 9 months ago

vivekmattu002 commented 1 year ago

How can we send multiple data in headers?

n1crack commented 9 months ago

the library is updated. see latest changes.

<div>
    <vue-finder id='my_vuefinder' :request="request"></vue-finder>
</div>

<script setup>
  const request = "http://vuefinder-php.test"

  // Or ...
  const request = {
    // ----- CHANGE ME! -----
    // [REQUIRED] Url for development server endpoint
    baseUrl: "http://vuefinder-php.test",
    // ----- CHANGE ME! -----

    // Additional headers & params & body
    headers: { "X-ADDITIONAL-HEADER": 'yes' },
    params: { additionalParam1: 'yes' },
    body: { additionalBody1: ['yes'] },

    // And/or transform request callback
    transformRequest: req => {
      if (req.method === 'get') {
        req.params.vf = "1"
      }
      return req;
    },

    // XSRF Token header name
    xsrfHeaderName: "X-CSRF-TOKEN",
  }
</script>