{"id":25842760,"url":"https://github.com/nir3x/httpcontentwriter","last_synced_at":"2025-06-29T10:37:37.420Z","repository":{"id":220260866,"uuid":"751175513","full_name":"NIR3X/httpcontentwriter","owner":"NIR3X","description":"HTTP Content Writer - Custom http.ResponseWriter for Dynamic Content-Type","archived":false,"fork":false,"pushed_at":"2024-02-16T04:03:36.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-01T06:32:08.366Z","etag":null,"topics":["content-type","go","golang","http","http-response","middleware"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NIR3X.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,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-02-01T04:33:02.000Z","updated_at":"2024-02-01T04:39:22.000Z","dependencies_parsed_at":"2024-02-16T05:22:51.343Z","dependency_job_id":null,"html_url":"https://github.com/NIR3X/httpcontentwriter","commit_stats":null,"previous_names":["nir3x/httpcontentwriter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/NIR3X/httpcontentwriter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NIR3X%2Fhttpcontentwriter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NIR3X%2Fhttpcontentwriter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NIR3X%2Fhttpcontentwriter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NIR3X%2Fhttpcontentwriter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NIR3X","download_url":"https://codeload.github.com/NIR3X/httpcontentwriter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NIR3X%2Fhttpcontentwriter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262579621,"owners_count":23331866,"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":["content-type","go","golang","http","http-response","middleware"],"created_at":"2025-03-01T06:31:36.413Z","updated_at":"2025-06-29T10:37:37.388Z","avatar_url":"https://github.com/NIR3X.png","language":"Go","readme":"# HTTP Content Writer - Custom http.ResponseWriter for Dynamic Content-Type\n\nThe `httpcontentwriter` package provides a custom `http.ResponseWriter` implementation that allows you to set the content type on the first write. This can be useful in scenarios where you want to dynamically determine the content type based on the content being written.\n\n## Installation\n\nYou can install the package using the `go get` command:\n\n```bash\ngo get -u github.com/NIR3X/httpcontentwriter\n```\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"net/http\"\n\t\"github.com/NIR3X/httpcontentwriter\"\n)\n\nfunc handler(w http.ResponseWriter, r *http.Request) {\n\t// Create a new HttpContentWriter instance\n\tcontentWriter := httpcontentwriter.NewHttpContentWriter(w)\n\n\t// Your logic here, writing content to the response using contentWriter\n\tcontentWriter.Write([]uint8(\"Hello, World!\"))\n}\n\nfunc main() {\n\thttp.HandleFunc(\"/\", handler)\n\thttp.ListenAndServe(\":8080\", nil)\n}\n```\n\n## License\n\n[![GNU AGPLv3 Image](https://www.gnu.org/graphics/agplv3-155x51.png)](https://www.gnu.org/licenses/agpl-3.0.html)\n\nThis program is Free Software: You can use, study share and improve it at your\nwill. Specifically you can redistribute and/or modify it under the terms of the\n[GNU Affero General Public License](https://www.gnu.org/licenses/agpl-3.0.html) as\npublished by the Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnir3x%2Fhttpcontentwriter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnir3x%2Fhttpcontentwriter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnir3x%2Fhttpcontentwriter/lists"}