Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

post request with data and headers

const createPostRequest = async () => {
	try{
		const { data } = await axios.post(url, body_data, {
		   headers: {
	    	 'Authorization': `Basic ${token}`
		   },
		})
    
	    console.log(data)
	} catch (error) {
		console.log(error)
	}
}

createPostRequest();
Comment

PREVIOUS NEXT
Code Example
Javascript :: working with json in javascript 
Javascript :: upi id regex 
Javascript :: get key for value javascript 
Javascript :: uppercase-the-first-letter-of-a-string-using-javascript/ 
Javascript :: Navigator operation requested with a context that does not include a Navigator. 
Javascript :: vscode js intellisence not working 
Javascript :: jquery selector class child 
Javascript :: javascript function to strikethrough text 
Javascript :: Como saber se existe um atributo em um objeto 
Javascript :: divide symbol javascript 
Javascript :: react load script after render 
Javascript :: javascript select function 
Javascript :: find all in array javascript 
Javascript :: get only string from html description javascript 
Javascript :: array flat 
Javascript :: foreach method javascript 
Javascript :: how to apply border to table in angular 
Javascript :: indexof method 
Javascript :: node.js error handling process 
Javascript :: javascript moment 
Javascript :: auto scroll to view react-native 
Javascript :: learn mongodb 
Javascript :: check if s3 bucket exists in lambda 
Javascript :: javascript continue with for Loop 
Javascript :: jquery multiple ids same function 
Javascript :: form-data upload file 
Javascript :: [W] undefined:undefined - Ruleset uses old version (version [1]). Please update to the latest version (version [2]). 
Javascript :: javascript array flatten 
Javascript :: es6 array to object keys 
Javascript :: get the length of an object vuejs 
ADD CONTENT
Topic
Content
Source link
Name
9+3 =