Skip to content

Instantly share code, notes, and snippets.

@sw1nn
Created April 1, 2020 10:36
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 sw1nn/9244762d5c859c9efa3bf573487f0ec9 to your computer and use it in GitHub Desktop.
Save sw1nn/9244762d5c859c9efa3bf573487f0ec9 to your computer and use it in GitHub Desktop.
(defn parse-rfc7231-accept-charset [s]
(->> s
(re-seq rfc-7231-re)
(keep #(vector (.group % "charset")
(some-> (.group % "weight")
Float/parseFloat)))
(into {})))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment