{"id":16824920,"url":"https://github.com/tomnomnom/rawhttp","last_synced_at":"2025-06-24T07:05:57.302Z","repository":{"id":37388790,"uuid":"102188761","full_name":"tomnomnom/rawhttp","owner":"tomnomnom","description":"A Go library for making HTTP requests with complete control","archived":false,"fork":false,"pushed_at":"2022-06-11T22:55:54.000Z","size":17,"stargazers_count":125,"open_issues_count":8,"forks_count":23,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-02T11:03:51.126Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/tomnomnom.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-09-02T10:19:16.000Z","updated_at":"2025-03-25T02:00:05.000Z","dependencies_parsed_at":"2022-08-26T11:10:30.115Z","dependency_job_id":null,"html_url":"https://github.com/tomnomnom/rawhttp","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/tomnomnom%2Frawhttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Frawhttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Frawhttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomnomnom%2Frawhttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomnomnom","download_url":"https://codeload.github.com/tomnomnom/rawhttp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248036063,"owners_count":21037092,"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":[],"created_at":"2024-10-13T11:12:25.943Z","updated_at":"2025-04-09T12:06:41.914Z","avatar_url":"https://github.com/tomnomnom.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rawhttp\n\n[![Build Status](https://img.shields.io/travis/tomnomnom/rawhttp/master.svg?style=flat)](https://travis-ci.org/tomnomnom/rawhttp)\n[![Documentation](https://img.shields.io/badge/godoc-reference-brightgreen.svg?style=flat)](https://godoc.org/github.com/tomnomnom/rawhttp)\n\nrawhttp is a [Go](https://golang.org/) package for making HTTP requests.\nIt intends to fill a niche that [https://golang.org/pkg/net/http/](net/http) does not cover:\nhaving *complete* control over the requests being sent to the server.\n\nrawhttp purposefully does as little validation as possible, and you can override just about\nanything about the request; even the line endings.\n\n**Warning:** This is a work in progress. The API isn't fixed yet.\n\nFull documentation can be found on [GoDoc](https://godoc.org/github.com/tomnomnom/rawhttp).\n\n## Example\n\n```go\nreq, err := rawhttp.FromURL(\"POST\", \"https://httpbin.org\")\nif err != nil {\n\tlog.Fatal(err)\n}\n\n// automatically set the host header\nreq.AutoSetHost()\n\nreq.Method = \"PUT\"\nreq.Hostname = \"httpbin.org\"\nreq.Port = \"443\"\nreq.Path = \"/anything\"\nreq.Query = \"one=1\u0026two=2\"\nreq.Fragment = \"anchor\"\nreq.Proto = \"HTTP/1.1\"\nreq.EOL = \"\\r\\n\"\n\nreq.AddHeader(\"Content-Type: application/x-www-form-urlencoded\")\n\nreq.Body = \"username=AzureDiamond\u0026password=hunter2\"\n\n// automatically set the Content-Length header\nreq.AutoSetContentLength()\n\nfmt.Printf(\"%s\\n\\n\", req.String())\n\nresp, err := rawhttp.Do(req)\nif err != nil {\n\tlog.Fatal(err)\n}\n\nfmt.Printf(\"\u003c %s\\n\", resp.StatusLine())\nfor _, h := range resp.Headers() {\n\tfmt.Printf(\"\u003c %s\\n\", h)\n}\n\nfmt.Printf(\"\\n%s\\n\", resp.Body())\n```\n\n```\nPUT /anything?one=1\u0026two=2#anchor HTTP/1.1\nHost: httpbin.org\nContent-Type: application/x-www-form-urlencoded\nContent-Length: 38\n\nusername=AzureDiamond\u0026password=hunter2\n\n\u003c HTTP/1.1 200 OK\n\u003c Connection: keep-alive\n\u003c Server: meinheld/0.6.1\n\u003c Date: Sat, 02 Sep 2017 13:22:06 GMT\n\u003c Content-Type: application/json\n\u003c Access-Control-Allow-Origin: *\n\u003c Access-Control-Allow-Credentials: true\n\u003c X-Powered-By: Flask\n\u003c X-Processed-Time: 0.000869989395142\n\u003c Content-Length: 443\n\u003c Via: 1.1 vegur\n\n{\n  \"args\": {\n    \"one\": \"1\",\n    \"two\": \"2\"\n  },\n  \"data\": \"\",\n  \"files\": {},\n  \"form\": {\n    \"password\": \"hunter2\",\n    \"username\": \"AzureDiamond\"\n  },\n  \"headers\": {\n    \"Connection\": \"close\",\n    \"Content-Length\": \"38\",\n    \"Content-Type\": \"application/x-www-form-urlencoded\",\n    \"Host\": \"httpbin.org\"\n  },\n  \"json\": null,\n  \"method\": \"PUT\",\n  \"origin\": \"123.123.123.123\",\n  \"url\": \"https://httpbin.org/anything?one=1\u0026two=2\"\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomnomnom%2Frawhttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomnomnom%2Frawhttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomnomnom%2Frawhttp/lists"}