nuxt / http

Universal HTTP Module for Nuxt.js
https://http.nuxtjs.org
MIT License
229 stars 51 forks source link

post method headers #184

Open amirabbasTehrani opened 3 years ago

amirabbasTehrani commented 3 years ago

Hi, I cant use headers for my post request and there is no example for setting headers.

Here is what I wanted to operate:

async asyncData ({ $http }) { const value= await $http.$post('https://example.com', '{"someBody":[someValue]}', { headers: { 'content-type': 'application/json;charset=UTF-8' } }) return { value} },