Skip to content

Commit

Permalink
Prevent http client from converting our form data (#56772)
Browse files Browse the repository at this point in the history
If we don't specify an undefined content-type like so, the client
attempts to convert our form data into a JSON string, and the backend
returns an understandable 415.

This fixes rule imports.
  • Loading branch information
rylnd authored Feb 4, 2020
1 parent e74ab19 commit 954cbee
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ export const importRules = async ({
`${DETECTION_ENGINE_RULES_URL}/_import`,
{
method: 'POST',
headers: { 'Content-Type': undefined },
query: { overwrite },
body: formData,
asResponse: true,
Expand Down

0 comments on commit 954cbee

Please sign in to comment.