Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

axios post request

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();
Source by masteringjs.io #
 
PREVIOUS NEXT
Tagged: #axios #post #request
ADD COMMENT
Topic
Name
6+5 =