This is a library for making your flow function acting as a lambda service in test.flows.network.
```rust use lambdaflows::{requestreceived, send_response};
pub fn run() { if let Some((qry, body)) = requestreceived() { sendresponse( 200, vec![(String::from("content-type"), String::from("text/html"))], "ok".asbytes().tovec(), ); } } ```
In run()
the request_received
will create a listener for the http request.
When a request is received, the run()
will be called again. We get the query and body then set the status, headers and body of the response using send_response
.
The whole document is here.