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