HTTP
HTTP copied to clipboard
urlDecode is partial
In ghci:
ghci > urlDecode "http://twitter.com/fred/statuses/200"
"http://twitter.com/fred/statuses/200"
ghci > urlDecode "http://twitter.com/%user_screen_name%/statuses/%id%"
"http://twitter.com/*** Exception: Char.digitToInt: not a digit 'u'
It would be vastly nicer if urlDecode
's type was something like String -> Either String String
.
+1 - even the definition for unEscapeString seems saner.
I wonder if this function even belongs in HTTP - would network-uri be a better home?
network-uri already has unEscapeString which has better behaviour. maybe it should just be thrown out.