{"id":18542370,"url":"https://github.com/alauda/kube-rest","last_synced_at":"2026-04-29T15:04:20.478Z","repository":{"id":92236791,"uuid":"197108527","full_name":"alauda/kube-rest","owner":"alauda","description":"Making http request using client-go ","archived":false,"fork":false,"pushed_at":"2023-03-07T00:25:24.000Z","size":66,"stargazers_count":1,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-05T02:38:37.993Z","etag":null,"topics":["back-off","client","client-go","forhumans","golang","http","kubernetes","rate-limiting","rest"],"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/alauda.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}},"created_at":"2019-07-16T02:48:49.000Z","updated_at":"2019-11-07T11:40:12.000Z","dependencies_parsed_at":"2023-09-05T01:02:33.846Z","dependency_job_id":null,"html_url":"https://github.com/alauda/kube-rest","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/alauda/kube-rest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alauda%2Fkube-rest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alauda%2Fkube-rest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alauda%2Fkube-rest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alauda%2Fkube-rest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alauda","download_url":"https://codeload.github.com/alauda/kube-rest/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alauda%2Fkube-rest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32430803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T13:34:34.882Z","status":"ssl_error","status_checked_at":"2026-04-29T13:34:29.830Z","response_time":110,"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":["back-off","client","client-go","forhumans","golang","http","kubernetes","rate-limiting","rest"],"created_at":"2024-11-06T20:08:13.425Z","updated_at":"2026-04-29T15:04:20.461Z","avatar_url":"https://github.com/alauda.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kube-rest\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/alauda/kube-rest/blob/master/LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/alauda/kube-rest)](https://goreportcard.com/report/github.com/alauda/kube-rest)\n\nKube-Rest implement a http client for making restful request with kubernetes client-go.\n\n## Why \nClient-go is not just a client for talking to kubernetes cluster, it is also a good rest client for go:\n\n* multi serilizers: json, portobuf and other serilizers could be added by user\n* rate-limiting support: you can specify your QPS for local client\n* back-off manager: a back-off manager for unexpected network failover\n* human readable/ writeable restful interfaces: the interface is easy to read and write\n\n\n## How to use\n\nFor example, if we want to make a `POST` request to httpbin.org:\n\n```golang\nimport (\n\t\"context\"\n\t\"fmt\"\n\t\"log\"\n\t\"net/url\"\n\n\t\"github.com/alauda/kube-rest/pkg/config\"\n\t\"github.com/alauda/kube-rest/pkg/http\"\n\t\"github.com/alauda/kube-rest/pkg/types\"\n)\n\nfunc main() {\n\taddress := \"http://httpbin.org\"\n\tclient, err := http.NewForConfig(config.GetConfigOrDie(address))\n\tif nil != err {\n\t\tlog.Fatal(err)\n\t}\n\n\tv := url.Values{}\n\tv.Set(\"Content-Type\", \"application/json\")\n\toption := \u0026types.Options{\n\t\tHeader: v,\n\t}\n\n\tbt, err := client.Create(context.TODO(), \"post\", nil, option)\n\n\tif nil != err {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Println(fmt.Sprintf(\"%s\", bt))\n}\n```\n\nCheck the [examples](https://github.com/alauda/kube-rest/tree/master/exmaples/https) for more examples.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falauda%2Fkube-rest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falauda%2Fkube-rest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falauda%2Fkube-rest/lists"}