{"id":41396291,"url":"https://github.com/evalphobia/httpwrapper","last_synced_at":"2026-01-23T12:57:40.183Z","repository":{"id":49985690,"uuid":"79181201","full_name":"evalphobia/httpwrapper","owner":"evalphobia","description":"HTTP client wrapper using h2non/gentleman","archived":false,"fork":false,"pushed_at":"2021-06-07T03:12:45.000Z","size":16,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-21T18:06:22.679Z","etag":null,"topics":["golang","http"],"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/evalphobia.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-01-17T02:46:15.000Z","updated_at":"2021-06-07T03:12:47.000Z","dependencies_parsed_at":"2022-09-18T18:04:26.502Z","dependency_job_id":null,"html_url":"https://github.com/evalphobia/httpwrapper","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/evalphobia/httpwrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evalphobia%2Fhttpwrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evalphobia%2Fhttpwrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evalphobia%2Fhttpwrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evalphobia%2Fhttpwrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/evalphobia","download_url":"https://codeload.github.com/evalphobia/httpwrapper/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/evalphobia%2Fhttpwrapper/sbom","scorecard":{"id":385383,"data":{"date":"2025-08-11","repo":{"name":"github.com/evalphobia/httpwrapper","commit":"3bee986578ec7e12b6efffd08f226d7770256336"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/12 approved changesets -- score normalized to 0","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":"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":"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":"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":"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":"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":"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":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"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 4 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"}}]},"last_synced_at":"2025-08-18T16:28:26.173Z","repository_id":49985690,"created_at":"2025-08-18T16:28:26.173Z","updated_at":"2025-08-18T16:28:26.173Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28692491,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T11:01:27.039Z","status":"ssl_error","status_checked_at":"2026-01-23T11:00:26.909Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["golang","http"],"created_at":"2026-01-23T12:57:39.537Z","updated_at":"2026-01-23T12:57:40.155Z","avatar_url":"https://github.com/evalphobia.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"httpwrapper\n----\n\n[![GoDoc][1]][2] [![License: MIT][3]][4] [![Release][5]][6] [![Build Status][7]][8] [![Codecov Coverage][11]][12] [![Go Report Card][13]][14] [![Code Climate][19]][20] [![BCH compliance][21]][22]\n\n[1]: https://godoc.org/github.com/evalphobia/httpwrapper?status.svg\n[2]: https://godoc.org/github.com/evalphobia/httpwrapper\n[3]: https://img.shields.io/badge/License-MIT-blue.svg\n[4]: LICENSE.md\n[5]: https://img.shields.io/github/release/evalphobia/httpwrapper.svg\n[6]: https://github.com/evalphobia/httpwrapper/releases/latest\n[7]: https://travis-ci.org/evalphobia/httpwrapper.svg?branch=master\n[8]: https://travis-ci.org/evalphobia/httpwrapper\n[9]: https://coveralls.io/repos/evalphobia/httpwrapper/badge.svg?branch=master\u0026service=github\n[10]: https://coveralls.io/github/evalphobia/httpwrapper?branch=master\n[11]: https://codecov.io/github/evalphobia/httpwrapper/coverage.svg?branch=master\n[12]: https://codecov.io/github/evalphobia/httpwrapper?branch=master\n[13]: https://goreportcard.com/badge/github.com/evalphobia/httpwrapper\n[14]: https://goreportcard.com/report/github.com/evalphobia/httpwrapper\n[15]: https://img.shields.io/github/downloads/evalphobia/httpwrapper/total.svg?maxAge=1800\n[16]: https://github.com/evalphobia/httpwrapper/releases\n[17]: https://img.shields.io/github/stars/evalphobia/httpwrapper.svg\n[18]: https://github.com/evalphobia/httpwrapper/stargazers\n[19]: https://codeclimate.com/github/evalphobia/httpwrapper/badges/gpa.svg\n[20]: https://codeclimate.com/github/evalphobia/httpwrapper\n[21]: https://bettercodehub.com/edge/badge/evalphobia/httpwrapper?branch=master\n[22]: https://bettercodehub.com/\n\nHTTP client wrapper using [h2non/gentleman](https://github.com/h2non/gentleman)\n\n# Quick Usage\n\n```go\npackage main\n\nimport (\n\t\"time\"\n\n\t// automatically set debug flag (output HTTP request/response to stdout)\n\t//  _ \"github.com/evalphobia/httpwrapper/debug\"\n\t\"github.com/evalphobia/httpwrapper/request\"\n)\n\nfunc main() {\n\t// Example #1\n\t// GET request\n\tresp, err := request.GET(\"http://example.com\", request.Option{\n\t\tHeaders: map[string]string{\"x-example-token\": \"abcdefg\"},\n\t\tTimeout: 10 * time.Second,\n\t\tRetry:   true,\n\t\t// output HTTP request/response\n\t\tDebug: false,\n\t\t// for basic auth\n\t\tUser:  \"MyName\",\n\t\tPass:  \"secret\",\n\t\tQuery: \"name=MyName\u0026pass=secret\",\n\t\t// Query: map[string]string{\"name\": \"MyName\", \"pass\": \"secret\"},\n\t})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\t// if status code is not 2xx.\n\tif err := resp.HasStatusCodeError(); err != nil {\n\t\tpanic(err)\n\t}\n\n\t// for JSON response\n\tuser := User{}\n\terr = resp.JSON(\u0026user)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// for XML response\n\terr = resp.XML(\u0026user, nil)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Example #2\n\t// POST request and set response result.\n\tuser = User{}\n\terr = request.CallWithResult(request.Option{\n\t\tURL:         \"http://example.com\",\n\t\tMethod:      request.MethodPOST,\n\t\tPayloadType: request.PayloadTypeJSON,\n\t\tPayload:     map[string]interface{}{\"param1\": 100, \"param2\": \"abc\"},\n\t}, \u0026user)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// ...\n}\n\n// struct for HTTP response data\ntype User struct {\n\tLastName  string `json:\"last_name\" xml:\"last_name\"`\n\tFirstName string `json:\"first_name\" xml:\"first_name\"`\n\tAge       int    `json:\"age\" xml:\"age\"`\n}\n```\n\n## Option\n\n|Name|Description|Example|\n|:--|:--|:--|\n| URL | Request URL | `http://exmaple.com` |\n| Method | HTTP method name | `GET`, `POST`, `PUT`, `DELETE`. request package has constants (`request.MethodGET` and others) |\n| Headers | HTTP headers | `map[string]string{\"X-HTTP-SOMETHING\": \"1\"}` |\n| Timeout | HTTP timeout| `30 * time.Second` |\n| Retry | retry flag, if set `true` and timeout has occured, then it tries another 2 requests | |\n| Debug | if set `true`, then it outputs HTTP request/response to stdout. | |\n| Plugins | [gentleman's plugins](https://github.com/h2non/gentleman/tree/master/plugin) | |\n| UserAgent | User Agent | `Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A372 Safari/604.1` |\n| User | Basic auth username | |\n| Pass | Basic auth password | |\n| Query | HTTP Query String in `string`, `map[string]string` or `map[string]interface{}` | `name=aaa\u0026pass=bbb\u0026param=ccc` |\n| PayloadType | Define type of `Payload` | `JSON`, `XML`, `BODY`, `FORM`, `DATA`. request package has variables (`request.PayloadTypeJSON` and others) |\n| Payload | Request body parameters | |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevalphobia%2Fhttpwrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fevalphobia%2Fhttpwrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fevalphobia%2Fhttpwrapper/lists"}