[wp-trac] [WordPress Trac] #61353: WordPress Playground POST request issue
WordPress Trac
noreply at wordpress.org
Mon Jun 3 10:24:13 UTC 2024
#61353: WordPress Playground POST request issue
--------------------------+----------------------------------
Reporter: ilija123456 | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: HTTP API | Version: 6.3
Severity: blocker | Keywords: wordpress-playground
Focuses: |
--------------------------+----------------------------------
Hello guys, I have a plugin that is sending some request to OpenAI API, I
tried it with wp_remote_post, file_get_contents, cURL POST requests. All
three of them are working on my local website, but I tried it in WordPress
playground and none of them are working.
I get these errors: file_get_contents(): https:// wrapper is disabled in
the server configuration by allow_url_fopen=0 in /wordpress/wp-
content/plugins/rename-FILE_GET_CONTENTS/rename.php on line 122
file_get_contents(https://api.openai.com/v1/chat/completions): Failed to
open stream: no suitable wrapper could be found in /wordpress/wp-
content/plugins/rename-FILE_GET_CONTENTS/rename.php on line 122,
wp_remote_post:
{
"error": {
"message": "you must provide a model parameter",
"type": "invalid_request_error",
"param": null,
"code": null
}
}
For the wp_remote_post, the model paramater is provided correctly (I also
tried to provide bad API key and it gives the error that API key is bad).
For cURL I get this error: Uncaught Error: Call to undefined function
curl_init() in /wordpress/wp-content/plugins/rename-CURL/rename.php:152
--
Ticket URL: <https://core.trac.wordpress.org/ticket/61353>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list