Skip to content

Commit

Permalink
passes Content-Type explicitly for fetch polyfill
Browse files Browse the repository at this point in the history
  • Loading branch information
en30 committed Nov 1, 2021
1 parent 0df1f0b commit b71edb9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/core/drive/form_submission.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@ export class FormSubmission {
headers["X-CSRF-Token"] = token
}
headers["Accept"] = [ StreamMessage.contentType, headers["Accept"] ].join(", ")

// temprary fix for fetch polyfill
if(request.body instanceof URLSearchParams) {
headers["Content-Type"] = "application/x-www-form-urlencoded;charset=UTF-8"
}
}
}

Expand Down

1 comment on commit b71edb9

@en30
Copy link
Owner Author

@en30 en30 commented on b71edb9 Nov 2, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.