When parsing a request without an User-Agent, woothee returns UNKNOWN (string), however for a cleaner API I would suggest to have some sort of an enum or just an Option if the parser couldn't determine the given part.
This way a user of the crate (me) wouldn't need to filter the UNKNOWN string in order to get an Option that will show whether there is a value parsed.
Update: I saw that the rest of the woothee libraries do the same and I understand this might be to have consistency across them, however I still want to see your thoughts about this.
When parsing a request without an
User-Agent,wootheereturnsUNKNOWN(string), however for a cleaner API I would suggest to have some sort of an enum or just anOptionif the parser couldn't determine the given part.This way a user of the crate (me) wouldn't need to filter the
UNKNOWNstring in order to get anOptionthat will show whether there is a value parsed.Update: I saw that the rest of the
wootheelibraries do the same and I understand this might be to have consistency across them, however I still want to see your thoughts about this.