Skip to content

Commit

Permalink
Send API requests as a JSON blob, instead of form encoded data. (#5971)
Browse files Browse the repository at this point in the history
Fixes #5867.
  • Loading branch information
pento authored Apr 6, 2018
1 parent 0782f09 commit 4e7a0c7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/compat.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ function gutenberg_shim_api_request_emulate_http( $scripts ) {
}
options.headers['X-HTTP-Method-Override'] = options.method;
options.method = 'POST';
options.contentType = 'application/json';
options.data = JSON.stringify( options.data );
}
}
Expand Down

0 comments on commit 4e7a0c7

Please sign in to comment.