You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
When parsing a request without an
User-Agent
,woothee
returnsUNKNOWN
(string), however for a cleaner API I would suggest to have some sort of an enum or just anOption
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 anOption
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.The text was updated successfully, but these errors were encountered: