Skip to content

cannot send post method in "request" function from Axios instance #723

@alpancs

Description

@alpancs

When I try to send POST method using this code:

const axios = require('axios')
let config = {url: 'http://{{hostname}}', method: 'post'}
let instance = axios.create(config)
instance.request()

It send GET method instead of POST.

I think this line https://github.com/mzabriskie/axios/blob/master/lib/core/Axios.js#L37 should be: config = utils.merge(defaults, this.defaults, config);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions