Open key88sf opened 6 months ago
Let’s:
Also, I’m re-categorizing this as a crash since it’s an error in a basic WordPress feature
Got the same issue. This currently makes my plugin not usable with Playground so would be great to get fixed. Is there a potential workaround in the meantime?
My plugin uses
wp_remote_post
with aContent-Type: application/json
header (see below for code sample). While it works fine in regular WordPress installs, when this code runs in Playground, the Content-Type header is not respected, and instead gets sent asapplication/x-www-form-urlencoded
. This causes my wp_remote_post() call to fail since the server returns an error.Example of wp_remote_post() call with content-type header:
I confirmed this same exact request to the server endpoint with the proper content-type header works as expected.
The Chrome network tab confirms playground is sending Content-Type:
application/x-www-form-urlencoded
:My blueprint file DOES include networking, etc:
Any ideas if it is possible to fix this?