Answers for "how to send basic auth using fetch"

2

how to send basic auth using fetch

fetch(url, {
	...options, 
	headers: {
    	'Authorization': 'Basic ' + btoa(`${username}:${password}`)
    }
})
.then(response => response.json())
.then(json => console.log(json));
Posted by: Guest on October-11-2020
0

how to send basic auth using fetch

800000
Posted by: Guest on July-02-2021

Code answers related to "BASIC"

Browse Popular Code Answers by Language