Opened 4 months ago
Closed 4 months ago
#61353 closed defect (bug) (invalid)
WordPress Playground POST request issue
Reported by: | ilija123456 | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 6.3 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
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
Change History (2)
#2
@
4 months ago
- Component changed from HTTP API to General
- Keywords wordpress-playground removed
- Milestone Awaiting Review deleted
- Resolution set to invalid
- Severity changed from blocker to normal
- Status changed from new to closed
Hi there, welcome to Trac!
Here we track issues in WordPress core itself. For issues with Playground, please report it at https://github.com/WordPress/wordpress-playground
Sorry, the version is 6.5 on WordPress Playground