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([ $context = stream_context_create([
"http" => [ "http" => [
"header" => $this->http_headers(), "header" => $this->http_headers(),
"method" => $method->value, "method" => $method->name,
"ignore_errors" => true, "ignore_errors" => true,
"content" => !empty($payload) ? json_encode($payload) : "" "content" => !empty($payload) ? json_encode($payload) : ""
], ],

View file

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