question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Alter body or header dynamically

See original GitHub issue

Hello, is there a way to change the body or the header of the request when it gets called such as the pathFn ?

A use case: I dispatch a "connexion" action:

this.$store.dispatch('connexion', {
  data: {
    _username: ...,
    _password: ...
  }
}

In this example, my component emitting the action is holding the request’s body. If I change it here, I break the api call. If I have to transform it into a FormData() object, I have to do it in place into the component.

Is there a way to avoid this ? Can I do it in the Vapi store definition ?

By the way, thanks for this cool library !

Cheers.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
christianmalekcommented, Jul 4, 2018

@leogout Since version 2.8.0 it’s possible to set headers dynamically.

1reaction
leogoutcommented, Oct 3, 2017

Hello, after a few attempts, I’ve come to the conclustion that it wouldn’t be practical without breaking changes. Sorry for that, I’ll try again when I get more spare time.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to dynamically change header based on AngularJS ...
I am using ng-view to include AngularJS partial views, and I want to update the page title and h1 header tags based on...
Read more >
Change Header Names Dynamically in JQwidgets JQX Grid
i recently came across a situation to change the grid's header columns text should be changed dynamically, when ever user change a text...
Read more >
Dynamic header image on Project:Support desk - MediaWiki
The only alternative I can think of is to change the logo (rather then the header) on a per-page basis using Extension:Logotipo.
Read more >
Can we change the value of global variable in header ...
No as a variable in the header directive is a Constant and has global scope where as defining the same name variable within...
Read more >
Dynamic Column header change in Power BI Visual
Solved: Hello Team, How can we change column headers(or rename column names ) when we select the drop down list values using Power...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found