Created
March 14, 2010 09:29
-
-
Save aconbere/331884 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Method = Get | Head | Post | Put | Options | Delete | Trace | Connect deriving (Show) | |
m name ctor = ctor <$ string name <* (char ' ') | |
parseMethod = m "GET" Get | |
<|> m "HEAD" Head | |
<|> try (m "POST" Post) <|> m "PUT" Put | |
<|> m "OPTIONS" Options | |
<|> m "DELETE" Delete | |
<|> m "TRACE" Trace | |
<|> m "CONNECT" Connect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment