{"id":26076840,"url":"https://github.com/purescript-contrib/purescript-http-methods","last_synced_at":"2026-02-10T18:31:28.340Z","repository":{"id":3919515,"uuid":"51327326","full_name":"purescript-contrib/purescript-http-methods","owner":"purescript-contrib","description":"HTTP method type","archived":false,"fork":false,"pushed_at":"2022-04-27T21:53:00.000Z","size":68,"stargazers_count":9,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-19T22:48:57.731Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PureScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/purescript-contrib.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-02-08T21:10:14.000Z","updated_at":"2023-02-06T12:08:53.000Z","dependencies_parsed_at":"2022-08-07T03:00:04.591Z","dependency_job_id":null,"html_url":"https://github.com/purescript-contrib/purescript-http-methods","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/purescript-contrib/purescript-http-methods","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-contrib%2Fpurescript-http-methods","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-contrib%2Fpurescript-http-methods/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-contrib%2Fpurescript-http-methods/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-contrib%2Fpurescript-http-methods/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/purescript-contrib","download_url":"https://codeload.github.com/purescript-contrib/purescript-http-methods/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/purescript-contrib%2Fpurescript-http-methods/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29311086,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-10T17:48:59.043Z","status":"ssl_error","status_checked_at":"2026-02-10T17:45:37.240Z","response_time":65,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2025-03-09T02:36:16.021Z","updated_at":"2026-02-10T18:31:28.307Z","avatar_url":"https://github.com/purescript-contrib.png","language":"PureScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HTTP Methods\n\n[![CI](https://github.com/purescript-contrib/purescript-http-methods/workflows/CI/badge.svg?branch=main)](https://github.com/purescript-contrib/purescript-http-methods/actions?query=workflow%3ACI+branch%3Amain)\n[![Release](https://img.shields.io/github/release/purescript-contrib/purescript-http-methods.svg)](https://github.com/purescript-contrib/purescript-http-methods/releases)\n[![Pursuit](https://pursuit.purescript.org/packages/purescript-http-methods/badge)](https://pursuit.purescript.org/packages/purescript-http-methods)\n[![Maintainer: garyb](https://img.shields.io/badge/maintainer-garyb-teal.svg)](https://github.com/garyb)\n\nHTTP method type. The definition of the type is based on HTTP/1.1 with [RFC 2518](https://tools.ietf.org/html/rfc2518) and [RFC 5789](https://tools.ietf.org/html/rfc5789).\n\n## Installation\n\nInstall `http-methods` with [Spago](https://github.com/purescript/spago):\n\n```sh\nspago install http-methods\n```\n\n## Quick start\n\n```purescript\nmodule PrintingExample where\n\nimport Data.HTTP.Method (Method(..), print)\nimport Data.Either (Either(..))\n\n-- To print an HTTP method, use the `print` function:\n\n-- same as \"GET\"\ngetMethod :: String\ngetMethod = print (Left GET)\n```\n\n```purescript\nmodule ParsingExample where\n\nimport Data.HTTP.Method (Method(..), CustomMethod(..), parse, fromString)\nimport Data.Either (Either(..))\n\n-- To parse an HTTP method, use the `fromString` function:\n\n-- same as `Left GET`.\ngetMethod :: Either Method CustomMethod\ngetMethod = fromString \"GET\"\n\n-- Any methods not defined by `Method` will be parsed as a custom method:\n\n-- same as `Right (CustomMethod \"FOO\")`\nfooMethod :: Either Method CustomMethod\nfooMethod = fromString \"FOO\"\n\n-- If you want to handle the parsing in a more controlled way,\n-- use `parse` directly.\n\n-- Only accept methods defined in the Method type\n-- and ignore all other custom methods\nmaybeMethod :: String -\u003e Maybe Method\nmaybeMethod = parse Just (\\_ -\u003e Nothing)\n```\n\n## Documentation\n\n`http-methods` documentation is stored in a few places:\n\n1. Module documentation is [published on Pursuit](https://pursuit.purescript.org/packages/purescript-http-methods).\n2. See [the changelog](./CHANGELOG.md).\n\nIf you get stuck, there are several ways to get help:\n\n- [Open an issue](https://github.com/purescript-contrib/purescript-http-methods/issues) if you have encountered a bug or problem.\n- Ask general questions on the [PureScript Discourse](https://discourse.purescript.org) forum or the [PureScript Discord](https://purescript.org/chat) chat.\n\n## Contributing\n\nYou can contribute to `http-methods` in several ways:\n\n1. If you encounter a problem or have a question, please [open an issue](https://github.com/purescript-contrib/purescript-http-methods/issues). We'll do our best to work with you to resolve or answer it.\n\n2. If you would like to contribute code, tests, or documentation, please [read the contributor guide](./CONTRIBUTING.md). It's a short, helpful introduction to contributing to this library, including development instructions.\n\n3. If you have written a library, tutorial, guide, or other resource based on this package, please share it on the [PureScript Discourse](https://discourse.purescript.org)! Writing libraries and learning resources are a great way to help this library succeed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurescript-contrib%2Fpurescript-http-methods","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpurescript-contrib%2Fpurescript-http-methods","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpurescript-contrib%2Fpurescript-http-methods/lists"}