Answers for "what is user-agent in axios"

2

axios node js set user agent

axios
    .get(`url`, 
{ headers: { 'User-Agent': 'YOUR-SERVICE-NAME' }  } )
    .then(response => {
      
      // here will be cheerio scraping
    })
    .catch(function(e) {
      console.log(e);
    });
Posted by: Guest on March-24-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language