Proper example of handling HTTP GET request in Rust

From the spec:

type HeaderField = record { text; text; };

but you define

headers : vec record { value : text; name : text };

If you use a tuple instead of a struct it should work:

pub type HeaderField = (String, String);
1 Like