feat: with spin test app

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
2024-01-23 21:24:01 +01:00
parent 5db3d83c79
commit 7c11555a53
11 changed files with 1056 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
use spin_sdk::http::{IntoResponse, Request, Response};
use spin_sdk::http_component;
/// A simple Spin HTTP component.
#[http_component]
fn handle_spin_test_app(req: Request) -> anyhow::Result<impl IntoResponse> {
println!("Handling request to {:?}", req.header("spin-full-url"));
Ok(Response::builder()
.status(200)
.header("content-type", "text/plain")
.body("Hello, Fermyon")
.build())
}