Skip to content

Not work with FormData #28

@MeloJR

Description

@MeloJR

When you pass FormData objects as the data parameter the library sends the request as application/json.

The problem is here:

		if (data && typeof data === 'object') {
			data = JSON.stringify(data);
			customHeaders['Content-Type'] = 'application/json';
		}

as typeof new FormData() === 'object'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcompatCompatibility issuehas fixA fix is PR'd or merged, but not yet released

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions