{"id":18494819,"url":"https://github.com/gbrlsnchs/httphandler","last_synced_at":"2025-05-14T02:33:05.850Z","repository":{"id":57570029,"uuid":"104407056","full_name":"gbrlsnchs/httphandler","owner":"gbrlsnchs","description":"Golang minimalist HTTP handler","archived":false,"fork":false,"pushed_at":"2018-03-02T18:39:41.000Z","size":49,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-07T13:54:06.440Z","etag":null,"topics":["go","golang","http-handler"],"latest_commit_sha":null,"homepage":"","language":"Go","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/gbrlsnchs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-09-21T23:03:28.000Z","updated_at":"2018-02-06T18:06:50.000Z","dependencies_parsed_at":"2022-09-10T17:40:30.314Z","dependency_job_id":null,"html_url":"https://github.com/gbrlsnchs/httphandler","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbrlsnchs%2Fhttphandler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbrlsnchs%2Fhttphandler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbrlsnchs%2Fhttphandler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gbrlsnchs%2Fhttphandler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gbrlsnchs","download_url":"https://codeload.github.com/gbrlsnchs/httphandler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239210276,"owners_count":19600508,"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":["go","golang","http-handler"],"created_at":"2024-11-06T13:22:17.983Z","updated_at":"2025-02-16T23:26:37.723Z","avatar_url":"https://github.com/gbrlsnchs.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# httphandler (Minimalist HTTP Handler)\n[![Build Status](https://travis-ci.org/gbrlsnchs/httphandler.svg?branch=master)](https://travis-ci.org/gbrlsnchs/httphandler)\n[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg)](https://godoc.org/github.com/gbrlsnchs/httphandler)\n\n## About\nThis package is a minimalist HTTP handler for [Go] (or Golang) HTTP servers.  \nIt is compatible with any response content type that has a marshaller function.\n\n## Usage\nFull documentation [here].\n\n## Example\n```go\npackage httphandler_test\n\nimport (\n\t\"errors\"\n\t\"net/http\"\n\n\t\"github.com/gbrlsnchs/httphandler\"\n)\n\nfunc Example() {\n\th := httphandler.New(func(w http.ResponseWriter, _ *http.Request) (httphandler.Responder, error) {\n\t\terr := errors.New(\"Example error\")\n\n\t\tif err != nil {\n\t\t\treturn nil, \u0026errorMockup{\n\t\t\t\tMsg:  err.Error(),\n\t\t\t\tCode: http.StatusBadRequest,\n\t\t\t}\n\t\t}\n\n\t\treturn \u0026responderMockup{\n\t\t\tmsg:  \"Hello, World!\",\n\t\t\tcode: http.StatusOK,\n\t\t}, nil\n\t})\n\n\thttp.Handle(\"/example\", h)\n}\n```\n\n## Contribution\n### How to help:\n- Pull Requests\n- Issues\n- Opinions\n\n[Go]: https://golang.org\n[here]: https://godoc.org/github.com/gbrlsnchs/httphandler\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbrlsnchs%2Fhttphandler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgbrlsnchs%2Fhttphandler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgbrlsnchs%2Fhttphandler/lists"}