Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

axio to get post method in node js

const axios = require('axios');

async function makeRequest() {

    const config = {
        method: 'get',
        url: 'http://webcode.me',
        headers: { 'User-Agent': 'Axios - console app' }
    }

    let res = await axios(config)

    console.log(res.request._header);
}

makeRequest();
Source by zetcode.com #
 
PREVIOUS NEXT
Tagged: #axio #post #method #node #js
ADD COMMENT
Topic
Name
9+1 =