{"id":47169843,"url":"https://github.com/ajzo90/go-requests","last_synced_at":"2026-03-13T04:41:59.385Z","repository":{"id":42445035,"uuid":"471525093","full_name":"ajzo90/go-requests","owner":"ajzo90","description":"Request builder for flexible and composable requests","archived":false,"fork":false,"pushed_at":"2022-04-08T13:35:40.000Z","size":58,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-07-27T21:53:55.923Z","etag":null,"topics":["builder","go","golang","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/ajzo90.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-03-18T21:44:16.000Z","updated_at":"2022-03-18T23:29:38.000Z","dependencies_parsed_at":"2022-09-16T18:01:01.821Z","dependency_job_id":null,"html_url":"https://github.com/ajzo90/go-requests","commit_stats":null,"previous_names":[],"tags_count":2,"template":null,"template_full_name":null,"purl":"pkg:github/ajzo90/go-requests","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajzo90%2Fgo-requests","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajzo90%2Fgo-requests/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajzo90%2Fgo-requests/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajzo90%2Fgo-requests/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajzo90","download_url":"https://codeload.github.com/ajzo90/go-requests/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajzo90%2Fgo-requests/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30458073,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-13T03:55:51.346Z","status":"ssl_error","status_checked_at":"2026-03-13T03:55:33.055Z","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":["builder","go","golang","http","request"],"created_at":"2026-03-13T04:41:58.417Z","updated_at":"2026-03-13T04:41:59.375Z","avatar_url":"https://github.com/ajzo90.png","language":"Go","readme":"# go-requests\n\nRequest builder for flexible and composable requests.\n\n[![CICD](https://github.com/ajzo90/go-requests/actions/workflows/ci.yml/badge.svg)](https://github.com/ajzo90/go-requests/actions/workflows/ci.yml)\n[![CICD](https://github.com/ajzo90/go-requests/actions/workflows/go.yml/badge.svg)](https://github.com/ajzo90/go-requests/actions/workflows/go.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/ajzo90/go-requests)](https://goreportcard.com/report/github.com/ajzo90/go-requests)\n[![GoDoc](https://godoc.org/github.com/ajzo90/go-requests?status.svg)](https://godoc.org/github.com/ajzo90/go-requests)\n[![License](https://shields.io/github/license/ajzo90/go-requests)](LICENSE)\n[![Latest Version](https://shields.io/github/v/release/ajzo90/go-requests?display_name=tag\u0026sort=semver)](https://github.com/ajzo90/go-requests/releases)\n[![codecov](https://codecov.io/gh/ajzo90/go-requests/branch/main/graph/badge.svg?token=BDKHJVZCUY)](https://codecov.io/gh/ajzo90/go-requests)\n\n## Usage\n\n### Late/lazy materialisation, values can be pointers to string\n```go\nvar token = \"secret\"\n\nvar builder = requests.NewPost(\"example.com/test\").\n    Query(\"key\", \"val\").\n    Header(\"token\", \u0026token)\n\njsonResp, err := builder.ExecJSON()\n\ntoken = \"super-secret\" // update token\t\t\n\njsonResp, err := builder.ExecJSON()\n\n```\n\n### Secret masking\n```go\n\nrequests.New(url).\n    Method(http.MethodGet).\n    Path(\"/foo/bar\").\n    Query(\"k\", \"${key}\").\n    Header(\"user-agent\", \"x\").\n    Header(\"Auth\", \"${key}\").\n    Header(\"Miss\", \"${miss}\").\n    SecretHeader(\"my-header\", \"secret2\").\n    BasicAuth(\"christian\", \"secret3\").\n    JSONBody(\"hello\").\n    WithExtended(func(req *requests.ExtendedRequest) {\n        req.Doer(doer)\n        req.Secret(\"key\", \"secret\")\n        req.Timeout(time.Second * 6)\n        _ = req.Write(os.Stdout)\n    })\n```\n```shell\nGET /foo/bar?k=xxxxxx HTTP/1.1\nHost: 127.0.0.1:63181\nUser-Agent: x\nContent-Length: 7\nAuth: xxxxxx\nAuthorization: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\nContent-Type: application/json\nMiss: ${miss}\nMy-Header: xxxxxxx\n\n\"hello\"\n```\n\n## Todo\n\n- [ ] Context\n- [ ] Error validation. 200, 2xx, customer, other?\n- [ ] Retry\n- [ ] Throttle\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajzo90%2Fgo-requests","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajzo90%2Fgo-requests","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajzo90%2Fgo-requests/lists"}