{"id":19614341,"url":"https://github.com/fpapado/elm-set-cookie-parser","last_synced_at":"2025-06-27T01:32:14.756Z","repository":{"id":96504900,"uuid":"154971313","full_name":"fpapado/elm-set-cookie-parser","owner":"fpapado","description":"A parser for the Set-Cookie header, written in Elm.","archived":false,"fork":false,"pushed_at":"2018-10-28T18:29:34.000Z","size":38,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T17:47:39.761Z","etag":null,"topics":["elm","parser","set-cookie"],"latest_commit_sha":null,"homepage":"","language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fpapado.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-10-27T14:06:00.000Z","updated_at":"2018-10-28T18:30:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb57976c-fa7a-4403-8d16-64ca8bcc9a05","html_url":"https://github.com/fpapado/elm-set-cookie-parser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fpapado/elm-set-cookie-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpapado%2Felm-set-cookie-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpapado%2Felm-set-cookie-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpapado%2Felm-set-cookie-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpapado%2Felm-set-cookie-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fpapado","download_url":"https://codeload.github.com/fpapado/elm-set-cookie-parser/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fpapado%2Felm-set-cookie-parser/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262172398,"owners_count":23270000,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elm","parser","set-cookie"],"created_at":"2024-11-11T10:51:27.594Z","updated_at":"2025-06-27T01:32:14.695Z","avatar_url":"https://github.com/fpapado.png","language":"Elm","funding_links":[],"categories":[],"sub_categories":[],"readme":"# elm-set-cookie-parser\n\n\u003e A parser for the Set-Cookie header, written in Elm.\n\n:construction: Not yet published :construction:\n\n## Usage\n\n```elm\nimport SetCookieParser exposing (SetCookie)\n\nheaderString = \"count=300; Max-Age=12345; HttpOnly\"\n\nheader : Result err SetCookie\nheader = SetCookieParser.fromString headerString\n```\n\n## Why? Why not?\n\nMostly not.\n\nThere is probably no reason to want to parse this header on the client-side of a web app, since the browser does that already.\nSimilarly, on the server, there is more behaviour tied to Cookies, so your server most likely handles parsing already.\nYou also probably don't want to store/handle the cookies in scripts in the first place.\n\nPersonally, I felt like trying out the Elm Parser API, because it looked fun! And the Set-Cookie header was giving me pain on another project recently, so it was a good chance to demystify it.\n\nIf you ever want to parse or understand the Set-Cookie header, I hope this can be a lightweight, readable version :)\n\n## Development\n\nInstall the Elm dependencies:\n\n```sh\nnpm install\n```\n\nRun the test suite:\n\n```sh\nelm-test\n```\n\n## Limitations\n\nHere are some things I did not attempt currently.\nFeel free to open an Issue to discuss before trying them out and sending a PR!\n\n- Only parses single headers at the moment. You would have to manually split a string that contains multiple headers.\n\n- Does not attempt to parse the date in the \"Expires\" header at the moment.\n\n## References\n\n- [The Set-Cookie header is part of RFC 6265](https://tools.ietf.org/html/rfc6265)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffpapado%2Felm-set-cookie-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffpapado%2Felm-set-cookie-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffpapado%2Felm-set-cookie-parser/lists"}