{"id":17435714,"url":"https://github.com/hueristiq/hq-go-http","last_synced_at":"2025-04-16T03:31:06.946Z","repository":{"id":257819981,"uuid":"868252110","full_name":"hueristiq/hq-go-http","owner":"hueristiq","description":"A  Go (Golang) package for robust and flexible HTTP communication. It offers advanced features such as configurable retry policies, fallback to HTTP/2, custom hooks for request/response/error handling, and fluent request building with connection management.","archived":false,"fork":false,"pushed_at":"2025-02-12T18:31:06.000Z","size":124,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T19:37:30.713Z","etag":null,"topics":["go","golang","golang-package","http-client","http-headers","http-methods","http-status","http-status-codes"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/hueristiq/hq-go-http","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/hueristiq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2024-10-05T21:49:52.000Z","updated_at":"2025-02-12T18:30:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"246f219a-ffd3-4b07-976a-cfdce7a5c114","html_url":"https://github.com/hueristiq/hq-go-http","commit_stats":{"total_commits":10,"total_committers":1,"mean_commits":10.0,"dds":0.0,"last_synced_commit":"532feebd5687a125e8cb83d642c66cd541a17424"},"previous_names":["hueristiq/hq-go-http"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hueristiq%2Fhq-go-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hueristiq%2Fhq-go-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hueristiq%2Fhq-go-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hueristiq%2Fhq-go-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hueristiq","download_url":"https://codeload.github.com/hueristiq/hq-go-http/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241341350,"owners_count":19947097,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["go","golang","golang-package","http-client","http-headers","http-methods","http-status","http-status-codes"],"created_at":"2024-10-17T10:01:06.930Z","updated_at":"2025-04-16T03:31:06.937Z","avatar_url":"https://github.com/hueristiq.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hq-go-http\n\n![made with go](https://img.shields.io/badge/made%20with-Go-1E90FF.svg) [![go report card](https://goreportcard.com/badge/github.com/hueristiq/hq-go-http)](https://goreportcard.com/report/github.com/hueristiq/hq-go-http) [![license](https://img.shields.io/badge/license-MIT-gray.svg?color=1E90FF)](https://github.com/hueristiq/hq-go-http/blob/master/LICENSE) ![maintenance](https://img.shields.io/badge/maintained%3F-yes-1E90FF.svg) [![open issues](https://img.shields.io/github/issues-raw/hueristiq/hq-go-http.svg?style=flat\u0026color=1E90FF)](https://github.com/hueristiq/hq-go-http/issues?q=is:issue+is:open) [![closed issues](https://img.shields.io/github/issues-closed-raw/hueristiq/hq-go-http.svg?style=flat\u0026color=1E90FF)](https://github.com/hueristiq/hq-go-http/issues?q=is:issue+is:closed) [![contribution](https://img.shields.io/badge/contributions-welcome-1E90FF.svg)](https://github.com/hueristiq/hq-go-http/blob/master/CONTRIBUTING.md)\n\n`hq-go-http` is a [Go (Golang)](http://golang.org/) package for robust and flexible HTTP communication. It provides advanced features such as configurable retry policies, automatic fallback between HTTP/1.x and HTTP/2, and fluent request building with connection management.\n\n## Resource\n\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [Licensing](#licensing)\n\n## Features\n\n- **HTTP/1.x and HTTP/2 Support:** The client maintains both HTTP/1.x and HTTP/2 clients. If the HTTP/1.x client encounters a specific transport error, the package automatically falls back to HTTP/2.\n- **Connection Management:** Automatically manages idle connections to prevent resource exhaustion, ensuring that connections are properly drained and closed when no longer needed.\n- **Configurable Retry Logic:** Customize the maximum number of retries, set minimum/maximum wait times, and choose your backoff strategy (e.g., exponential backoff with jitter).\n\n## Installation\n\nTo install `hq-go-http`, run:\n\n```bash\ngo get -v -u github.com/hueristiq/hq-go-http\n```\n\nMake sure your Go environment is set up properly (Go 1.x or later is recommended).\n\n## Usage\n\nHere's a simple example demonstrating how to use `hq-go-http`:\n\n```go\npackage main\n\nimport (\n\t\"log\"\n\n\thqgohttp \"github.com/hueristiq/hq-go-http\"\n)\n\nfunc main() {\n\tclient := hqgohttp.NewClient(\u0026hqgohttp.ClientConfiguration{\n\t\tRetryMax:     3,                // Max number of retries\n\t\tTimeout:      10 * time.Second, // Request timeout\n\t\tRetryWaitMin: 1 * time.Second,  // Minimum wait between retries\n\t\tRetryWaitMax: 5 * time.Second,  // Maximum wait between retries\n\t})\n\n\tresponse, err := client.Get(\"https://example.com\")\n\tif err != nil {\n\t\tlog.Fatalf(\"Request failed: %v\", err)\n\t}\n\n\tdefer response.Body.Close()\n\t// Handle response here\n}\n```\n\n## Contributing\n\nContributions are welcome and encouraged! Feel free to submit [Pull Requests](https://github.com/hueristiq/hq-go-http/pulls) or report [Issues](https://github.com/hueristiq/hq-go-http/issues). For more details, check out the [contribution guidelines](https://github.com/hueristiq/hq-go-http/blob/master/CONTRIBUTING.md).\n\nA big thank you to all the [contributors](https://github.com/hueristiq/hq-go-http/graphs/contributors) for your ongoing support!\n\n![contributors](https://contrib.rocks/image?repo=hueristiq/hq-go-http\u0026max=500)\n\n## Licensing\n\nThis package is licensed under the [MIT license](https://opensource.org/license/mit). You are free to use, modify, and distribute it, as long as you follow the terms of the license. You can find the full license text in the repository - [Full MIT license text](https://github.com/hueristiq/hq-go-http/blob/master/LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhueristiq%2Fhq-go-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhueristiq%2Fhq-go-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhueristiq%2Fhq-go-http/lists"}