{"id":18293181,"url":"https://github.com/joshbetz/bodyparser","last_synced_at":"2025-04-05T11:30:54.308Z","repository":{"id":57503261,"uuid":"86928989","full_name":"joshbetz/bodyparser","owner":"joshbetz","description":"Automatically parse request.Body depending on the Content-Type header","archived":false,"fork":false,"pushed_at":"2021-11-12T16:58:22.000Z","size":5,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-21T03:22:06.822Z","etag":null,"topics":["body-parser","go","golang"],"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/joshbetz.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-04-01T17:06:49.000Z","updated_at":"2021-11-12T16:58:25.000Z","dependencies_parsed_at":"2022-09-13T08:21:51.811Z","dependency_job_id":null,"html_url":"https://github.com/joshbetz/bodyparser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshbetz%2Fbodyparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshbetz%2Fbodyparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshbetz%2Fbodyparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joshbetz%2Fbodyparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joshbetz","download_url":"https://codeload.github.com/joshbetz/bodyparser/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247330478,"owners_count":20921638,"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":["body-parser","go","golang"],"created_at":"2024-11-05T14:23:06.716Z","updated_at":"2025-04-05T11:30:54.042Z","avatar_url":"https://github.com/joshbetz.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bodyparser\n\n[![Build Status](https://travis-ci.org/joshbetz/bodyparser.svg?branch=master)](https://travis-ci.org/joshbetz/bodyparser) [![Go Report Card](https://goreportcard.com/badge/github.com/joshbetz/bodyparser)](https://goreportcard.com/report/github.com/joshbetz/bodyparser) [![](https://godoc.org/github.com/joshbetz/bodyparser?status.svg)](http://godoc.org/github.com/joshbetz/bodyparser)\n\nAutomatically parse the net/http request.Body into request.Form data depending on the Content-Type header.\n\n## Example\n\n```go\nfunc main() {\n\th := http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {\n\t\tbody := fmt.Sprintf(\"Hello %s!\", r.FormValue(\"name\"))\n\t\tw.Write([]byte(body))\n\t})\n\n\thandler := bodyparser.Middleware(h)\n\thttp.ListenAndServe(\":3000\", handler)\n}\n```\n\n## API\n\n```go\nfunc Middleware(h http.Handler) http.Handler\n```\n\nA middleware for net/http to parse request bodies into request.Form data\ndepending on the content type.\n\n```go\nfunc Parse(r *http.Request) (map[string]interface{}, error)\n```\n\nSimilar to `Middleware`, but instead of fitting the data into request.Form,\nreturns a `map[string]interface{}`. Useful for parsing more complex data than\nstring to string.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshbetz%2Fbodyparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoshbetz%2Fbodyparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoshbetz%2Fbodyparser/lists"}