“Contoh Header Axios.Post” Kode Jawaban

Contoh Header Axios.Post

axios.post(
'https://example.com/postSomething', 
{ // this is the body
 email: varEmail, 
 password: varPassword
},
{
  headers: {
    Authorization: 'Bearer ' + varToken
  }
})
JoseHdez

header di Axios.get

const axios = require('axios');

// httpbin.org gives you the headers in the response
// body `res.data`.
// See: https://httpbin.org/#/HTTP_Methods/get_get
const res = await axios.get('https://httpbin.org/get', {
  headers: {
    'Test-Header': 'test-value'
  }
});

res.data.headers['Test-Header']; // "test-value"
Courageous Cat

Jawaban yang mirip dengan “Contoh Header Axios.Post”

Pertanyaan yang mirip dengan “Contoh Header Axios.Post”

Jelajahi jawaban kode populer menurut bahasa

Jelajahi bahasa kode lainnya