From 6b2f0a9fe1f1dbdd7ff70c636714ffcd7636fd70 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Mon, 10 Jan 2022 10:38:48 -0500 Subject: [PATCH] api-test.t: set a default method --- t/api-test.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/api-test.t b/t/api-test.t index bd26d487..08d52dc1 100644 --- a/t/api-test.t +++ b/t/api-test.t @@ -42,7 +42,7 @@ sub request_json { $req->uri("http://localhost$opts->{uri}"); $req->header(Accept => "application/json"); $req->header(Content_Type => "application/json"); - $req->header(Origin => "http://localhost/") if $opts->{method} eq "POST"; + $req->header(Origin => "http://localhost/") if ($opts->{method} // "") eq "POST"; $req->header(Cookie => $cookie); $req->content(encode_json($opts->{data})) if defined $opts->{data};