{"id":44070448,"url":"https://github.com/memclutter/gorequests","last_synced_at":"2026-02-08T04:12:02.032Z","repository":{"id":50694485,"uuid":"519861989","full_name":"memclutter/gorequests","owner":"memclutter","description":"http requests wrapper for go","archived":false,"fork":false,"pushed_at":"2023-01-05T21:53:04.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-06-21T00:12:27.741Z","etag":null,"topics":["golang","gorequests","http"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/memclutter.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":"2022-07-31T18:54:33.000Z","updated_at":"2023-01-05T20:57:00.000Z","dependencies_parsed_at":"2023-02-04T18:31:06.865Z","dependency_job_id":null,"html_url":"https://github.com/memclutter/gorequests","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/memclutter/gorequests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memclutter%2Fgorequests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memclutter%2Fgorequests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memclutter%2Fgorequests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memclutter%2Fgorequests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/memclutter","download_url":"https://codeload.github.com/memclutter/gorequests/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/memclutter%2Fgorequests/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29219579,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-08T03:18:47.732Z","status":"ssl_error","status_checked_at":"2026-02-08T03:15:31.985Z","response_time":57,"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":["golang","gorequests","http"],"created_at":"2026-02-08T04:12:01.248Z","updated_at":"2026-02-08T04:12:02.023Z","avatar_url":"https://github.com/memclutter.png","language":"Go","readme":"# gorequests\n\n[![Go](https://github.com/memclutter/gorequests/actions/workflows/go.yml/badge.svg)](https://github.com/memclutter/gorequests/actions/workflows/go.yml)\n[![codecov](https://codecov.io/gh/memclutter/gorequests/branch/main/graph/badge.svg?token=1IWTNCLCAQ)](https://codecov.io/gh/memclutter/gorequests)\n\nhttp requests wrapper for go.\n\n## Motivation\n\nThe motivation for this project was my feeling of disgust at the \"convenience\" of working with the golang http client. \nLet's say I want to request an ip address from the ipify service (this is not advertising!). \nWell, how do we do it on go? Dude, it’s easier than a steamed turnip, relax...\n\n```go\npackage main\n\nimport (\n\t\"encoding/json\"\n\t\"fmt\"\n\t\"io/ioutil\"\n\t\"net\"\n\t\"net/http\"\n)\n\nfunc GetIP() (net.IP, error) {\n\tres, err := http.Get(\"https://api.ipify.org?format=json\")\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer res.Body.Close()\n\tbody, err := ioutil.ReadAll(res.Body)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif res.StatusCode != http.StatusOK {\n\t\treturn nil, fmt.Errorf(res.Status)\n\t}\n\tdefer res.Body.Close()\n\tresData := make(map[string]string)\n\tif err := json.Unmarshal(body, \u0026resData); err != nil {\n\t\treturn nil, err\n\t}\n\tipStr, ok := resData[\"ip\"]\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"not found ip\")\n\t}\n\tip := net.ParseIP(ipStr)\n\tif len(ip) == 0 {\n\t\treturn nil, fmt.Errorf(\"invalid ip address '%s'\", ipStr)\n\t}\n\treturn ip, nil\n}\n\n// ...\n```\n\ncool right? I looked for alternatives, but did not find what would suit me. That's why I decided to make this project.\n\n## Idea\n\nIf we consider the previous option, the idea is as follows\n\n```go\npackage main\n\nimport (\n\t\"net\"\n\t\"net/http\"\n\t\"github.com/memclutter/gorequests\"\n)\n\nfunc GetIPEasy() (ip net.IP, err error) {\n    err = gorequests.Request().\n        Method(http.MethodGet).\n        Url(\"https://api.ipify.org?format=json\").\n        ResponseCodeOk(http.StatusOK).\n        ResponseJson(\u0026ip, \".ip\").\n        Exec()\n    return\n}\n// ...\n```\n\nor more short\n\n```go\npackage main\n\nimport (\n\t\"net\"\n\t\"net/http\"\n\t\"github.com/memclutter/gorequests\"\n)\n\nfunc GetIPEasy() (ip net.IP, err error) {\n\terr = gorequests.Get(\"https://api.ipify.org?format=json\").\n\t\tResponseCodeOk(http.StatusOK).\n\t\tResponseJson(\u0026ip, \".ip\").\n\t\tExec()\n\treturn\n}\n// ...\n```\n\nWow! Now I can focus on the business logic of the application, and not the details of decoding the server response.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemclutter%2Fgorequests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmemclutter%2Fgorequests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmemclutter%2Fgorequests/lists"}