Actix-web service not triggering

I can't seem to figure out why the following code will not work:

use actix_web::{get, post, web, App, HttpResponse, HttpServer, Responder};

// Permenant Redirect Cookie
async fn new_visitor() -> impl Responder {
    println!("New visitor!");
                random_string::generate(16, "0123456789ABCDEF")

async fn repeat_visitor(web::Path(id): web::Path<String>) -> impl Responder {
    println!("ID: {}", id);

async fn new_prop(web::Path((key, value)): web::Path<(String, String)>) -> impl Responder {
    println!("{}: {}", key, value);

async fn main() -> std::io::Result<()> {
    const PORT: u16 = 8000;
    println!("🚀 Server running on port: {}", PORT);

    HttpServer::new(|| {
    .bind(format!("{}", PORT))?

The first two services seem to work perfectly, however, I get no response on new_prop. Any help would be greatly appreciated!

How are you testing it? Is the client sending a POST request?

Ah, I can't believe I didn't notice that. My apologies!

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.