Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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);
    });
Source by github.com #
 
PREVIOUS NEXT
Tagged: #axios #node #js #set #user #agent
ADD COMMENT
Topic
Name
8+4 =