Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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();
 
PREVIOUS NEXT
Tagged: #post #request #data #headers
ADD COMMENT
Topic
Name
4+7 =