From 0e62928e8fd09d9d3757795ccec06527b808071f Mon Sep 17 00:00:00 2001 From: "Ryan.K" Date: Tue, 25 Jul 2023 17:17:22 +0800 Subject: [PATCH] support lowercase of http method --- node/bin/rings.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/bin/rings.rs b/node/bin/rings.rs index 0eee1ee96..2d166de45 100644 --- a/node/bin/rings.rs +++ b/node/bin/rings.rs @@ -293,7 +293,7 @@ struct SendHttpCommand { name: String, - #[arg(default_value = "get", long, short = 'X', help = "request method")] + #[arg(default_value = "GET", long, short = 'X', help = "request method")] method: String, #[arg(default_value = "/")] @@ -538,7 +538,7 @@ async fn main() -> anyhow::Result<()> { .send_http_request_message( args.to_did.as_str(), args.name.as_str(), - http::Method::from_str(args.method.as_str())?, + http::Method::from_str(args.method.to_uppercase().as_str())?, args.path.as_str(), args.timeout.into(), &args