{"id":15404517,"url":"https://github.com/k1low/curlreq","last_synced_at":"2025-04-16T20:53:57.158Z","repository":{"id":61458821,"uuid":"551467215","full_name":"k1LoW/curlreq","owner":"k1LoW","description":"curlreq creates *http.Request from curl command.","archived":false,"fork":false,"pushed_at":"2024-02-16T05:46:06.000Z","size":21,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T05:41:36.630Z","etag":null,"topics":["curl","http-request","parser"],"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/k1LoW.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"k1LoW","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2022-10-14T13:04:10.000Z","updated_at":"2024-07-19T07:12:39.000Z","dependencies_parsed_at":"2024-06-20T09:27:08.151Z","dependency_job_id":"c5c0c423-8c57-4e06-9607-bca3a8f14c66","html_url":"https://github.com/k1LoW/curlreq","commit_stats":{"total_commits":24,"total_committers":3,"mean_commits":8.0,"dds":0.5,"last_synced_commit":"2d98b33ba077d276073c8d43f4fc4402cf44156e"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1LoW%2Fcurlreq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1LoW%2Fcurlreq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1LoW%2Fcurlreq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k1LoW%2Fcurlreq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k1LoW","download_url":"https://codeload.github.com/k1LoW/curlreq/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249275777,"owners_count":21242284,"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":["curl","http-request","parser"],"created_at":"2024-10-01T16:13:28.783Z","updated_at":"2025-04-16T20:53:57.139Z","avatar_url":"https://github.com/k1LoW.png","language":"Go","readme":"# curlreq\n\n[![build](https://github.com/k1LoW/curlreq/actions/workflows/ci.yml/badge.svg)](https://github.com/k1LoW/curlreq/actions/workflows/ci.yml) [![Go Reference](https://pkg.go.dev/badge/github.com/k1LoW/curlreq.svg)](https://pkg.go.dev/github.com/k1LoW/curlreq) ![Coverage](https://raw.githubusercontent.com/k1LoW/octocovs/main/badges/k1LoW/curlreq/coverage.svg) ![Code to Test Ratio](https://raw.githubusercontent.com/k1LoW/octocovs/main/badges/k1LoW/curlreq/ratio.svg) ![Test Execution Time](https://raw.githubusercontent.com/k1LoW/octocovs/main/badges/k1LoW/curlreq/time.svg)\n\n`curlreq` creates `*http.Request` from [curl](https://curl.se/) command.\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"log\"\n\t\"net/http\"\n\n\t\"github.com/k1LoW/curlreq\"\n)\n\nfunc main() {\n\tcmd := \"curl https://example.com\"\n\treq, err := curlreq.NewRequest(cmd)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tclient := http.DefaultClient\n\tresp, err := client.Do(req)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tdefer resp.Body.Close()\n\n\tfmt.Println(resp.StatusCode)\n\n\t// Output:\n\t// 200\n}\n```\n\n## Reference\n\n- [tj/parse-curl.js](https://github.com/tj/parse-curl.js): Parse curl commands, returning an object representing the request.\n","funding_links":["https://github.com/sponsors/k1LoW"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk1low%2Fcurlreq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk1low%2Fcurlreq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk1low%2Fcurlreq/lists"}