From 51b7d51ff2edbe50e1085845152e8217cc16f2b1 Mon Sep 17 00:00:00 2001 From: Hiron Das Date: Tue, 3 Mar 2026 12:15:49 -0500 Subject: [PATCH] change request from get to post --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index d862c2b..23ef56b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,4 +1,4 @@ -use axum::{Router, response::IntoResponse, routing::get}; +use axum::{Router, response::IntoResponse, routing::{get, post}}; use reqwest::StatusCode; use serde_json::json; use std::env; @@ -6,8 +6,8 @@ use std::env; // Define an asynchronous main function with the tokio runtime macro #[tokio::main] async fn main() { - // Build our application with one route: a GET request to "/" - let app = Router::new().route("/", get(trigger_runner)); + // Build our application with one route: a POST request to "/" + let app = Router::new().route("/", post(trigger_runner)); let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap(); axum::serve(listener, app).await.unwrap();