axios node js set user agent

106

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);
    });

Comments

Submit
0 Comments