{"id":13693430,"url":"https://github.com/idoubi/goz","last_synced_at":"2026-01-12T07:37:15.616Z","repository":{"id":57483791,"uuid":"103037340","full_name":"idoubi/goz","owner":"idoubi","description":"A fantastic HTTP request libarary used in Golang.","archived":false,"fork":false,"pushed_at":"2023-10-13T04:47:28.000Z","size":413,"stargazers_count":260,"open_issues_count":7,"forks_count":59,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-23T23:08:19.143Z","etag":null,"topics":["curl","golang","goz","http","request"],"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/idoubi.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}},"created_at":"2017-09-10T14:49:03.000Z","updated_at":"2025-04-19T09:37:08.000Z","dependencies_parsed_at":"2023-02-01T23:46:17.179Z","dependency_job_id":"b9c85df0-bfa2-46ba-a8c7-b9638429c94d","html_url":"https://github.com/idoubi/goz","commit_stats":null,"previous_names":["mikemintang/goz","mikemintang/go-curl","idoubi/go-curl"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/idoubi/goz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idoubi%2Fgoz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idoubi%2Fgoz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idoubi%2Fgoz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idoubi%2Fgoz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/idoubi","download_url":"https://codeload.github.com/idoubi/goz/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/idoubi%2Fgoz/sbom","scorecard":{"id":481717,"data":{"date":"2025-08-11","repo":{"name":"github.com/idoubi/goz","commit":"753700942580294f114b3452b8797612a0d25c9d"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.9,"checks":[{"name":"Code-Review","score":1,"reason":"Found 4/25 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 10 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"10 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2023-1495 / GHSA-fxg5-wq6x-vr4w","Warn: Project is vulnerable to: GO-2022-1144 / GHSA-xrjj-mj9h-534m","Warn: Project is vulnerable to: GO-2023-1571 / GHSA-vvpx-j8f3-3w6h","Warn: Project is vulnerable to: GO-2023-1988 / GHSA-2wrh-6pvc-2jm9","Warn: Project is vulnerable to: GO-2023-2102 / GHSA-4374-p667-p6c8","Warn: Project is vulnerable to: GHSA-qppj-fm5r-hxr3","Warn: Project is vulnerable to: GO-2024-2687 / GHSA-4v7x-pqxf-cx7m","Warn: Project is vulnerable to: GO-2024-3333","Warn: Project is vulnerable to: GO-2025-3503 / GHSA-qxp5-gwg8-xv66","Warn: Project is vulnerable to: GO-2025-3595 / GHSA-vvgc-356p-c3xw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T16:48:27.648Z","repository_id":57483791,"created_at":"2025-08-19T16:48:27.648Z","updated_at":"2025-08-19T16:48:27.648Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28336595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T06:09:07.588Z","status":"ssl_error","status_checked_at":"2026-01-12T06:05:18.301Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","golang","goz","http","request"],"created_at":"2024-08-02T17:01:10.056Z","updated_at":"2026-01-12T07:37:15.602Z","avatar_url":"https://github.com/idoubi.png","language":"Go","funding_links":[],"categories":["开源类库","Open source library","Go (531)","Go"],"sub_categories":["HTTP","HTTP Print Test"],"readme":"# goz\n\nA fantastic HTTP request library used in golang. Inspired by [guzzle](https://github.com/guzzle/guzzle)\n\n## Installation\n\n```\ngo get -u github.com/idoubi/goz\n```\n\n\n## Documentation\n\nAPI documentation can be found here:\nhttps://godoc.org/github.com/idoubi/goz\n\n\n## Basic Usage\n\n```go\npackage main\n\nimport (\n    \"github.com/idoubi/goz\"\n)\n\nfunc main() {\n    cli := goz.NewClient()\n\n\tresp, err := cli.Get(\"http://127.0.0.1:8091/get\")\n\tif err != nil {\n\t\tlog.Fatalln(err)\n\t}\n\n\tfmt.Printf(\"%T\", resp)\n\t// Output: *goz.Response\n}\n```\n\n## Query Params\n\n- query map\n\n```go\ncli := goz.NewClient()\n\nresp, err := cli.Get(\"http://127.0.0.1:8091/get-with-query\", goz.Options{\n    Query: map[string]interface{}{\n        \"key1\": \"value1\",\n        \"key2\": []string{\"value21\", \"value22\"},\n        \"key3\": \"333\",\n    },\n})\nif err != nil {\n    log.Fatalln(err)\n}\n\nfmt.Printf(\"%s\", resp.GetRequest().URL.RawQuery)\n// Output: key1=value1\u0026key2=value21\u0026key2=value22\u0026key3=333\n```\n\n- query string\n\n```go\ncli := goz.NewClient()\n\nresp, err := cli.Get(\"http://127.0.0.1:8091/get-with-query?key0=value0\", goz.Options{\n    Query: \"key1=value1\u0026key2=value21\u0026key2=value22\u0026key3=333\",\n})\nif err != nil {\n    log.Fatalln(err)\n}\n\nfmt.Printf(\"%s\", resp.GetRequest().URL.RawQuery)\n// Output: key1=value1\u0026key2=value21\u0026key2=value22\u0026key3=333\n```\n\n## Post Data\n\n- post form \n\n```go\ncli := goz.NewClient()\n\nresp, err := cli.Post(\"http://127.0.0.1:8091/post-with-form-params\", goz.Options{\n    Headers: map[string]interface{}{\n        \"Content-Type\": \"application/x-www-form-urlencoded\",\n    },\n    FormParams: map[string]interface{}{\n        \"key1\": \"value1\",\n        \"key2\": []string{\"value21\", \"value22\"},\n        \"key3\": \"333\",\n    },\n})\nif err != nil {\n    log.Fatalln(err)\n}\n\nbody, _ := resp.GetBody()\nfmt.Println(body)\n// Output: form params:{\"key1\":[\"value1\"],\"key2\":[\"value21\",\"value22\"],\"key3\":[\"333\"]}\n```\n\n- post json \n\n```go\ncli := goz.NewClient()\n\nresp, err := cli.Post(\"http://127.0.0.1:8091/post-with-json\", goz.Options{\n    Headers: map[string]interface{}{\n        \"Content-Type\": \"application/json\",\n    },\n    JSON: struct {\n        Key1 string   `json:\"key1\"`\n        Key2 []string `json:\"key2\"`\n        Key3 int      `json:\"key3\"`\n    }{\"value1\", []string{\"value21\", \"value22\"}, 333},\n})\nif err != nil {\n    log.Fatalln(err)\n}\n\nbody, _ := resp.GetBody()\nfmt.Println(body)\n// Output: json:{\"key1\":\"value1\",\"key2\":[\"value21\",\"value22\"],\"key3\":333}\n```\n\n## Request Headers \n\n```go\ncli := goz.NewClient()\n\nresp, err := cli.Post(\"http://127.0.0.1:8091/post-with-headers\", goz.Options{\n    Headers: map[string]interface{}{\n        \"User-Agent\": \"testing/1.0\",\n        \"Accept\":     \"application/json\",\n        \"X-Foo\":      []string{\"Bar\", \"Baz\"},\n    },\n})\nif err != nil {\n    log.Fatalln(err)\n}\n\nheaders := resp.GetRequest().Header[\"X-Foo\"]\nfmt.Println(headers)\n// Output: [Bar Baz]\n```\n\n## Response \n\n```go\ncli := goz.NewClient()\nresp, err := cli.Get(\"http://127.0.0.1:8091/get\")\nif err != nil {\n    log.Fatalln(err)\n}\n\nbody, err := resp.GetBody()\nif err != nil {\n    log.Fatalln(err)\n}\nfmt.Printf(\"%T\", body)\n// Output: goz.ResponseBody\n\npart := body.Read(30)\nfmt.Printf(\"%T\", part)\n// Output: []uint8\n\ncontents := body.GetContents()\nfmt.Printf(\"%T\", contents)\n// Output: string\n\nfmt.Println(resp.GetStatusCode())\n// Output: 200\n\nfmt.Println(resp.GetReasonPhrase())\n// Output: OK\n\nheaders := resp.GetHeaders()\nfmt.Printf(\"%T\", headers)\n// Output: map[string][]string\n\nflag := resp.HasHeader(\"Content-Type\")\nfmt.Printf(\"%T\", flag)\n// Output: bool\n\nheader := resp.GetHeader(\"content-type\")\nfmt.Printf(\"%T\", header)\n// Output: []string\n    \nheaderLine := resp.GetHeaderLine(\"content-type\")\nfmt.Printf(\"%T\", headerLine)\n// Output: string\n```\n\n## Proxy\n\n```go\ncli := goz.NewClient()\n\nresp, err := cli.Get(\"https://www.fbisb.com/ip.php\", goz.Options{\n    Timeout: 5.0,\n    Proxy:   \"http://127.0.0.1:1087\",\n})\nif err != nil {\n    log.Fatalln(err)\n}\n\nfmt.Println(resp.GetStatusCode())\n// Output: 200\n```\n\n## Timeout \n\n```go\ncli := goz.NewClient(goz.Options{\n    Timeout: 0.9,\n})\nresp, err := cli.Get(\"http://127.0.0.1:8091/get-timeout\")\nif err != nil {\n    if resp.IsTimeout() {\n        fmt.Println(\"timeout\")\n        // Output: timeout\n        return\n    }\n}\n\nfmt.Println(\"not timeout\")\n```\n\n# License\n\n[MIT](https://opensource.org/licenses/MIT)\n\nCopyright (c) 2017-present, [idoubi](http://idoubi.cc)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidoubi%2Fgoz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidoubi%2Fgoz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidoubi%2Fgoz/lists"}