-
Notifications
You must be signed in to change notification settings - Fork 5
Description
In the sendPostRequest method, file_get_contents() is currently used to send an HTTP POST request to a specific URL and return the results. However, error messages are suppressed using the "@" operator, which is undesirable as it prevents potential errors from being detected.
Therefore, I propose replacing the file_get_contents() call with cURL to enable better error handling and exception handling. The new implementation would use CURLOPT_POST to ensure that the request is sent as an HTTP POST request and CURLOPT_RETURNTRANSFER to ensure that the response is returned as a string. This would give us more control over the request and enable more precise error handling.
I believe that this change would contribute to improved robustness and reliability of the sendPostRequest method.
Metadata
Metadata
Assignees
Labels
Projects
Status