Skip to content

Instantly share code, notes, and snippets.

@tsurushuu
Created September 25, 2011 04:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsurushuu/1240227 to your computer and use it in GitHub Desktop.
Save tsurushuu/1240227 to your computer and use it in GitHub Desktop.
twitter query string encoding.
import Network.HTTP
import Codec.Binary.UTF8.String
queryString :: String
queryString = "ひとし+君"
queryRPP :: Int
queryRPP = 10
makeRequestUrl :: String
makeRequestUrl = concat [
"http://search.twitter.com/search.json", "?",
urlEncodeVars [("q", encodeString queryString), ("lang", "ja"), ("rpp", show queryRPP)]
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment