Skip to content

Commit

Permalink
fix: dont force multpart/form-data
Browse files Browse the repository at this point in the history
  • Loading branch information
jackmellis committed Jul 22, 2024
1 parent 609466f commit 652cca0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/query/src/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ const query = async <T>(args: Args): Promise<T> => {

if (!headers['Content-Type'] && method !== 'GET') {
if (sourceData instanceof FormData) {
headers['Content-Type'] = 'multipart/form-data';
// Don't need to set the content type for a raw FormData instance
// headers['Content-Type'] = 'multipart/form-data';
} else if (sourceData && typeof sourceData === 'object') {
headers['Content-Type'] = 'application/json';
}
Expand Down

0 comments on commit 652cca0

Please sign in to comment.