Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check contect type axios response


const res = await axios.get('https://httpbin.org/get', { params: { answer: 42 } });

res.headers['content-type']; // 'application/json' or 'text/html; charset=UTF-8'
 
PREVIOUS NEXT
Tagged: #check #contect #type #axios #response
ADD COMMENT
Topic
Name
5+1 =