Quantcast
Channel: Active questions tagged header - Stack Overflow
Viewing all articles
Browse latest Browse all 699

Remove a header from POST request in Nuxt 3

$
0
0

I am trying to call an external API that appears to dislike my Origin header of http://localhost:3000 etc. which is fine, makes sense. But for testing purposes I just need to test that I can get the info back I need to move foreward on a project.

The API in question is referred to in this support comment which suggests removing the Origin header should do the trick:

How can I do that in Nuxt 3 using the $fetch API or perhaps a config/middleware/plugin thing? I've been searching for a while and I cannot find anyone trying to do the same, so I'm not sure if it's even possible. NOTE: The fetch is being made inside a useAsyncData call presently (if that's an issue).

Any pointer in the right direction would be greatfully appreciated.


Viewing all articles
Browse latest Browse all 699

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>