wip: 2024-03-18T11:52:20+0100 (1710759140)

This commit is contained in:
Victor Westerlund 2024-03-18 16:22:43 +01:00
parent 228b3c665d
commit 1d55090a31
2 changed files with 8 additions and 8 deletions

View file

@ -52,7 +52,7 @@
$context = stream_context_create([
"http" => [
"header" => $this->http_headers(),
"method" => $method->value,
"method" => $method->name,
"ignore_errors" => true,
"content" => !empty($payload) ? json_encode($payload) : ""
],

View file

@ -3,11 +3,11 @@
namespace Reflect;
// Allowed HTTP verbs
enum Method: string {
case GET = "GET";
case POST = "POST";
case PUT = "PUT";
case DELETE = "DELETE";
case PATCH = "PATCH";
case OPTIONS = "OPTIONS";
enum Method {
case GET;
case POST;
case PUT;
case DELETE;
case PATCH;
case OPTIONS;
}