{"id":13720901,"url":"https://github.com/asmcos/requests","last_synced_at":"2026-04-04T14:43:54.012Z","repository":{"id":41287885,"uuid":"146242867","full_name":"asmcos/requests","owner":"asmcos","description":"A golang HTTP client library. Salute to python requests.","archived":false,"fork":false,"pushed_at":"2024-08-05T06:14:51.000Z","size":45,"stargazers_count":665,"open_issues_count":17,"forks_count":89,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-05-07T13:35:02.345Z","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":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/asmcos.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,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2018-08-27T03:34:39.000Z","updated_at":"2025-04-14T01:07:37.000Z","dependencies_parsed_at":"2024-06-18T12:31:57.707Z","dependency_job_id":"f10095a5-2f2e-408d-87b1-5aad9eedab65","html_url":"https://github.com/asmcos/requests","commit_stats":{"total_commits":35,"total_committers":5,"mean_commits":7.0,"dds":0.1428571428571429,"last_synced_commit":"c839e8ae4946527bee1b646a85e41288778d0923"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/asmcos/requests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmcos%2Frequests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmcos%2Frequests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmcos%2Frequests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmcos%2Frequests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asmcos","download_url":"https://codeload.github.com/asmcos/requests/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asmcos%2Frequests/sbom","scorecard":{"id":212570,"data":{"date":"2025-08-11","repo":{"name":"github.com/asmcos/requests","commit":"c839e8ae4946527bee1b646a85e41288778d0923"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.1,"checks":[{"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":"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":"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":"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":"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":"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":"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":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 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":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"}}]},"last_synced_at":"2025-08-17T01:00:25.352Z","repository_id":41287885,"created_at":"2025-08-17T01:00:25.352Z","updated_at":"2025-08-17T01:00:25.352Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31403475,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: 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":[],"created_at":"2024-08-03T01:01:09.657Z","updated_at":"2026-04-04T14:43:53.992Z","avatar_url":"https://github.com/asmcos.png","language":"Go","funding_links":[],"categories":["HarmonyOS","Programming Languages"],"sub_categories":["Windows Manager","Go"],"readme":"\n[![license](http://dmlc.github.io/img/apache2.svg)](https://raw.githubusercontent.com/asmcos/requests/master/LICENSE)\n\n# requests\n\nRequests is an HTTP library  , it is easy to use. Similar to Python requests.\n\n# Installation\n\n```\ngo get -u github.com/asmcos/requests\n```\n\n# Start\n\n``` go\npackage main\n\nimport \"github.com/asmcos/requests\"\n\nfunc main (){\n\n        resp,err := requests.Get(\"http://www.zhanluejia.net.cn\")\n        if err != nil{\n          return\n        }\n        println(resp.Text())\n}\n```\n\n## Post\n\n``` go\npackage main\n\nimport \"github.com/asmcos/requests\"\n\n\nfunc main (){\n\n        data := requests.Datas{\n          \"name\":\"requests_post_test\",\n        }\n        resp,_ := requests.Post(\"https://www.httpbin.org/post\",data)\n        println(resp.Text())\n}\n\n```\n\n     Server return data...\n\n``` json\n{\n  \"args\": {},\n  \"data\": \"\",\n  \"files\": {},\n  \"form\": {\n    \"name\": \"requests_post_test\"\n  },\n  \"headers\": {\n    \"Accept-Encoding\": \"gzip\",\n    \"Connection\": \"close\",\n    \"Content-Length\": \"23\",\n    \"Content-Type\": \"application/x-www-form-urlencoded\",\n    \"Host\": \"www.httpbin.org\",\n    \"User-Agent\": \"Go-Requests 0.5\"\n  },\n  \"json\": null,\n  \"origin\": \"114.242.34.110\",\n  \"url\": \"https://www.httpbin.org/post\"\n}\n\n```\n\n\n## PostJson\n\n``` go\npackage main\n\nimport \"github.com/asmcos/requests\"\n\n\nfunc main (){\n\n        jsonStr := \"{\\\"name\\\":\\\"requests_post_test\\\"}\"\n        resp,_ := requests.PostJson(\"https://www.httpbin.org/post\",jsonStr)\n        println(resp.Text())\n}\n\n```\n\n     Server return data...\n\n``` json\n{\n  \"args\": {},\n  \"data\": \"\",\n  \"files\": {},\n  \"form\": {\n    \"name\": \"requests_post_test\"\n  },\n  \"headers\": {\n    \"Accept-Encoding\": \"gzip\",\n    \"Connection\": \"close\",\n    \"Content-Length\": \"23\",\n    \"Content-Type\": \"application/x-www-form-urlencoded\",\n    \"Host\": \"www.httpbin.org\",\n    \"User-Agent\": \"Go-Requests 0.5\"\n  },\n  \"json\": null,\n  \"origin\": \"114.242.34.110\",\n  \"url\": \"https://www.httpbin.org/post\"\n}\n\n```\n\n# Feature Support\n  - Set headers\n  - Set params\n  - Multipart File Uploads\n  - Sessions with Cookie Persistence\n  - Proxy\n  - Authentication\n  - JSON\n  - Chunked Requests\n  - Debug\n  - SetTimeout\n\n\n# Set header\n\n### example 1\n\n``` go\nreq := requests.Requests()\n\nresp,err := req.Get(\"http://www.zhanluejia.net.cn\",requests.Header{\"Referer\":\"http://www.jeapedu.com\"})\nif (err == nil){\n  println(resp.Text())\n}\n```\n\n### example 2\n\n``` go\nreq := requests.Requests()\nreq.Header.Set(\"accept-encoding\", \"gzip, deflate, br\")\nresp,_ := req.Get(\"http://www.zhanluejia.net.cn\",requests.Header{\"Referer\":\"http://www.jeapedu.com\"})\nprintln(resp.Text())\n\n```\n\n### example 3\n\n``` go\nh := requests.Header{\n  \"Referer\":         \"http://www.jeapedu.com\",\n  \"Accept-Language\": \"zh-CN,zh;q=0.9,en;q=0.8\",\n}\nresp,_ := req.Get(\"http://wwww.zhanluejia.net.cn\",h)\n\nh2 := requests.Header{\n  ...\n  ...\n}\nh3,h4 ....\n// two or more headers ...\nresp,_ = req.Get(\"http://www.zhanluejia.net.cn\",h,h2,h3,h4)\n```\n\n\n# Set params\n\n``` go\np := requests.Params{\n  \"title\": \"The blog\",\n  \"name\":  \"file\",\n  \"id\":    \"12345\",\n}\nresp,_ := req.Get(\"http://www.cpython.org\", p)\n\n```\n\n\n# Auth\n\nTest with the `correct` user information.\n\n``` go\nreq := requests.Requests()\nresp,_ := req.Get(\"https://api.github.com/user\",requests.Auth{\"asmcos\",\"password....\"})\nprintln(resp.Text())\n```\n\ngithub return\n\n```\n{\"login\":\"asmcos\",\"id\":xxxxx,\"node_id\":\"Mxxxxxxxxx==\".....\n```\n\n# JSON\n\n``` go\nreq := requests.Requests()\nreq.Header.Set(\"Content-Type\",\"application/json\")\nresp,_ = req.Get(\"https://httpbin.org/json\")\n\nvar json map[string]interface{}\nresp.Json(\u0026json)\n\nfor k,v := range json{\n  fmt.Println(k,v)\n}\n```\n\n\n# SetTimeout\n\n```\nreq := Requests()\nreq.Debug = 1\n\n// 20 Second\nreq.SetTimeout(20)\nreq.Get(\"http://golang.org\")\n```\n\n# Get Cookies\n\n``` go\nresp,_ = req.Get(\"https://www.httpbin.org\")\ncoo := resp.Cookies()\n// coo is [] *http.Cookies\nprintln(\"********cookies*******\")\nfor _, c:= range coo{\n  fmt.Println(c.Name,c.Value)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasmcos%2Frequests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasmcos%2Frequests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasmcos%2Frequests/lists"}