Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

axios interceptors

	axios.interceptors.request.use((value) => {
		value.headers = {
			'Access-Control-Allow-Origin': '*',
			'Access-Control-Allow-Methods': '*',
			'Access-Control-Allow-Headers': '*',
			'Accept': 'application/json',
			'Content-Type': 'application/json'
		}
		return value
	})
Source by www.codota.com #
 
PREVIOUS NEXT
Tagged: #axios #interceptors
ADD COMMENT
Topic
Name
4+9 =