axios#3220

node v10.24.1
version: 1.0.0
endpointsharetweet
const axios = require('axios@0.20.0') const instance = axios.create( { baseURL: 'https://www.some-domain.com/', headers: { 'content-type': 'application/x-www-form-urlencoded' }, data: { 'form-field1' : 'value 1' }, adapter(config) { console.log('config in adapter:', config) const response = { data: 'OK' }; return Promise.resolve(response) } }) instance('/some/resource/', { data: { 'form-field1' : 'value 1' } }) instance.delete('/some/resource/', { data: { 'form-field1' : 'value 1' } })
Loading…

no comments

    sign in to comment