From 1d55090a314b77a566d4c4d2fed223f6952da09c Mon Sep 17 00:00:00 2001 From: Victor Westerlund Date: Mon, 18 Mar 2024 16:22:43 +0100 Subject: [PATCH] wip: 2024-03-18T11:52:20+0100 (1710759140) --- src/Reflect/Client.php | 2 +- src/Reflect/Method.php | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Reflect/Client.php b/src/Reflect/Client.php index a052cb2..baeee7d 100644 --- a/src/Reflect/Client.php +++ b/src/Reflect/Client.php @@ -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) : "" ], diff --git a/src/Reflect/Method.php b/src/Reflect/Method.php index 00d4c67..55d735e 100644 --- a/src/Reflect/Method.php +++ b/src/Reflect/Method.php @@ -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; } \ No newline at end of file