header in axios
axios.post('url', {"body":data}, {
headers: {
'Content-Type': 'application/json'
}
}
)const username = ''
const password = ''
const token = Buffer.from(`${username}:${password}`, 'utf8').toString('base64')
const url = 'https://...'
axios.post(url, {
headers: {
'Authorization': `Basic ${token}`
}
})
header("Access-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: GET, POST, OPTIONS, HEAD");
header("Access-Control-Allow-Headers: Content-Type, header1");
Also in JavaScript:
- animated list in js
- bookshelfjs npm
- Twilio room does not disconnect / Webcam LED remains on
- how to add attribute to selected element in javascript
- javascript collection processing methods
- js check if date is future
- json schema vocabulary
- remove floating point javascript
- javascript date to utc format
- javascript default parameters
- Discord embeds
- modify margin top javascript
- javascript data em portugues
- javascript sort array strings alphabetically
- formik and yup reactjs
- scroll to top in react
- momentjs docs
- fill array with values javascript
- how to sho the active navigation ling using javascript
- get value of textarea jquery
- tick.json code
- javascript play audio
- populate dropdown with a variable
- send variable data from node js to front end javascript