{"id":13413643,"url":"https://github.com/opus-domini/fast-shot","last_synced_at":"2026-02-04T19:03:37.859Z","repository":{"id":196415021,"uuid":"692316615","full_name":"opus-domini/fast-shot","owner":"opus-domini","description":"Hit your API targets with rapid-fire precision using Go's fastest and simple HTTP Client.","archived":false,"fork":false,"pushed_at":"2025-08-19T14:42:24.000Z","size":1282,"stargazers_count":88,"open_issues_count":0,"forks_count":11,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-19T16:36:24.121Z","etag":null,"topics":["go","golang","golang-library","http-client","json","rest","xml"],"latest_commit_sha":null,"homepage":"https://opus-domini.github.io/fast-shot/","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/opus-domini.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"hugo-andrade"}},"created_at":"2023-09-16T05:29:29.000Z","updated_at":"2025-08-19T14:42:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"732b4ca4-9dd8-444b-a95e-225ed718a106","html_url":"https://github.com/opus-domini/fast-shot","commit_stats":null,"previous_names":["opus-domini/rest","opus-domini/fast-shot"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/opus-domini/fast-shot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opus-domini%2Ffast-shot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opus-domini%2Ffast-shot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opus-domini%2Ffast-shot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opus-domini%2Ffast-shot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opus-domini","download_url":"https://codeload.github.com/opus-domini/fast-shot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opus-domini%2Ffast-shot/sbom","scorecard":{"id":711337,"data":{"date":"2025-08-11","repo":{"name":"github.com/opus-domini/fast-shot","commit":"6940cebd020cef4102d91145dbd14b5a5ef5757a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.9,"checks":[{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/coverage.yml:1","Info: no jobLevel write permissions found"],"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":10,"reason":"no dangerous workflow patterns detected","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":"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":"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":"Code-Review","score":1,"reason":"Found 2/12 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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/coverage.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/opus-domini/fast-shot/coverage.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/coverage.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/opus-domini/fast-shot/coverage.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/coverage.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/opus-domini/fast-shot/coverage.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"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":"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":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"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":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"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":"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 29 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"}}]},"last_synced_at":"2025-08-22T08:17:05.819Z","repository_id":196415021,"created_at":"2025-08-22T08:17:05.819Z","updated_at":"2025-08-22T08:17:05.819Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29092993,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"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":["go","golang","golang-library","http-client","json","rest","xml"],"created_at":"2024-07-30T20:01:45.272Z","updated_at":"2026-02-04T19:03:37.840Z","avatar_url":"https://github.com/opus-domini.png","language":"Go","funding_links":["https://github.com/sponsors/hugo-andrade"],"categories":["Go","网络","Networking"],"sub_categories":["HTTP客户端","HTTP Clients"],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cimg src=\"docs/assets/images/logo.png\" alt=\"Logo fast-shot\" width=\"320\"/\u003e\n    \u003chr /\u003e\n    \u003cp\u003eA Fluent Go REST Client Library\u003c/p\u003e\n    \u003cp\u003e\n        \u003ca href=\"https://goreportcard.com/report/opus-domini/fast-shot\"\u003e\u003cimg src=\"https://goreportcard.com/badge/opus-domini/fast-shot\" alt=\"Go Report Badge\"\u003e\u003c/a\u003e\n        \u003ca href=\"https://godoc.org/github.com/opus-domini/fast-shot\"\u003e\u003cimg src=\"https://godoc.org/github.com/opus-domini/fast-shot?status.svg\" alt=\"Go Doc Badge\"\u003e\u003c/a\u003e    \n        \u003ca href=\"https://github.com/opus-domini/fast-shot/actions/workflows/coverage.yml\"\u003e\u003cimg src=\"https://github.com/opus-domini/fast-shot/actions/workflows/coverage.yml/badge.svg\" alt=\"Converage Actions Badge\"\u003e\u003c/a\u003e\n        \u003ca href=\"https://codecov.io/gh/opus-domini/fast-shot\"\u003e\u003cimg src=\"https://codecov.io/gh/opus-domini/fast-shot/graph/badge.svg?token=C80QDL5W7T\" alt=\"Codecov Badge\"/\u003e\u003c/a\u003e        \n        \u003ca href=\"https://github.com/opus-domini/fast-shot/blob/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/opus-domini/fast-shot.svg\" alt=\"License Badge\"\u003e\u003c/a\u003e\n        \u003ca href=\"https://github.com/avelino/awesome-go\"\u003e\u003cimg src=\"https://awesome.re/mentioned-badge.svg\" alt=\"Mentioned in Awesome Go\"\u003e\u003c/a\u003e\n    \u003c/p\u003e\n\u003c/div\u003e\n\nFast Shot is a robust, feature-rich, and highly configurable HTTP client for Go. Crafted with modern Go practices in mind, it offers a fluent, chainable API that allows for clean, idiomatic code.\n\n## Table of Contents\n\n- [Why Fast Shot?](#why-fast-shot)\n- [Features](#features-)\n- [Installation](#installation-)\n- [Quick Start](#quick-start-)\n- [Advanced Usage](#advanced-usage-)\n- [Contributing](#contributing-)\n\n## Why Fast Shot?\n\n* **Fluent \u0026 Chainable API**: Write expressive, readable, and flexible HTTP client code.\n* **Ease of Use**: Reduce boilerplate, making HTTP requests as straightforward as possible.\n* **Rich Features**: From headers to query parameters and JSON support, Fast Shot covers your needs.\n* **Advanced Retry Mechanism**: Built-in support for retries with various backoff strategies.\n\n## Features 🌟\n\n* Fluent and chainable API for clean, expressive code\n* Comprehensive HTTP method support (GET, POST, PUT, DELETE, etc.)\n* Flexible authentication options (Bearer Token, Basic Auth, Custom)\n* Easy manipulation of headers, cookies, and query parameters\n* Advanced retry mechanism with customizable backoff strategies\n* Client-side load balancing for improved reliability\n* JSON request and response support\n* XML request and response support\n* Timeout and redirect control\n* Proxy support\n* Extensible and customizable for specific needs\n* Well-tested and production-ready\n\n## Installation 🔧\n\nTo install Fast Shot, run the following command:\n\n```bash \ngo get github.com/opus-domini/fast-shot\n```\n\n## Quick Start 🚀\n\nHere's how you can make a simple POST using Fast Shot:\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    fastshot \"github.com/opus-domini/fast-shot\"\n    \"github.com/opus-domini/fast-shot/constant/mime\"\n)\n\nfunc main() {\n    client := fastshot.NewClient(\"https://api.example.com\").\n        Auth().BearerToken(\"your_token_here\").\n        Build()\n\n    payload := map[string]interface{}{\n        \"key1\": \"value1\",\n        \"key2\": \"value2\",\n    }\n\n    response, err := client.POST(\"/endpoint\").\n        Header().AddAccept(mime.JSON).\n        Body().AsJSON(payload).\n        Send()\n\n    // Check for request send problems.\n    if err != nil {\n        panic(err) // (¬_¬\")\n    }\n\n    // Check for (4xx || 5xx) errors response.\n    if response.Status().IsError() {\n        panic(response.Body().AsString()) // ¯\\_(ツ)_/¯\n    }\n\t\n    var result map[string]interface{}\n    _ := response.Body().AsJSON(\u0026result)\n\n    // Congrats! Do something awesome with the result (¬‿¬)\n}\n```\n\n## Advanced Usage 🤖\n\n### Fluent API\n\nEasily chain multiple settings in a single line:\n\n```go \nclient := fastshot.NewClient(\"https://api.example.com\").\n    Auth().BearerToken(\"your-bearer-token\").\n    Header().Add(\"My-Header\", \"My-Value\").\n    Config().SetTimeout(30 * time.Second).\n    Build()\n```\n### Advanced Retry Mechanism\n\nHandle transient failures with customizable backoff strategies:\n\n```go \nclient.POST(\"/resource\").\n    Retry().SetExponentialBackoff(2 * time.Second, 5, 2.0).\n    Send()\n```\n\nThis new retry feature supports:\n- Constant backoff\n- Exponential backoff\n- Full jitter for both constant and exponential backoff\n- Custom retry conditions\n- Maximum delay setting\n\n### Out-of-the-Box Support for Client Load Balancing\n\nEffortlessly manage multiple endpoints:\n\n```go\nclient := fastshot.NewClientLoadBalancer([]string{\n    \"https://api1.example.com\",\n    \"https://api2.example.com\",\n    \"https://api3.example.com\",\n    }).\n    Config().SetTimeout(time.Second * 10).\n    Build()\n```\n\nThis feature allows you to distribute network traffic across several servers, enhancing the performance and reliability of your applications.\n\n### Authentication\n\nFast Shot supports various types of authentication:\n\n```go\n// Bearer Token\nbuilder.Auth().BearerToken(\"your-bearer-token\")\n\n// Basic Authentication\nbuilder.Auth().BasicAuth(\"username\", \"password\")\n\n// Custom Authentication\nbuilder.Auth().Set(\"custom-authentication-header\")\n```\n\n### Custom Headers and Cookies\n\nAdd your own headers and cookies effortlessly:\n\n```go \n// Add Custom Header\nbuilder.Header().\n    Add(\"header\", \"value\")\n\n// Add Multiple Custom Headers\nbuilder.Header().\n    AddAll(map[string]string{\n        \"key1\": \"value1\",\n        \"key2\": \"value2\",\n        \"key3\": \"value3\",\n    })\n\n// Add Custom Cookie\nbuilder.Cookie().\n    Add(\u0026http.Cookie{Name: \"session_id\", Value: \"id\"})\n```\n\n### Advanced Configurations\n\nControl every aspect of the HTTP client:\n\n```go\n// Set Timeout\nbuilder.Config().\n    SetTimeout(time.Second * 30)\n\n// Set Follow Redirect\nbuilder.Config().\n    SetFollowRedirects(false)\n\n// Set Custom Transport\nbuilder.Config().\n    SetCustomTransport(myCustomTransport)\n\n// Set Proxy\nbuilder.Config().\n    SetProxy(\"http://my-proxy-server:port\")\n```\n\n### Response Handling\n\nExtract information from the response with ease:\n\n```go\n// Fluent response status check\nresponse.Status()\n\n// Easy response body access and conversion\nresponse.Body()\n\n// Get response headers to inspect\nresponse.Header()\n\n// Get response cookies for further processing \nresponse.Cookie()\n\n// Get raw response if needed\nresponse.Raw()\n\n// and more...\n```\n\n## Contributing 🤝\n\nWe welcome contributions to Fast Shot! Here's how you can contribute:\n\n1. Fork the repository\n2. Create a new branch for your feature or bug fix\n3. Write your code and tests\n4. Ensure all tests pass\n5. Submit a pull request\n\nPlease make sure to update tests as appropriate and adhere to the existing coding style.\n\nFor more detailed information, check out our [CONTRIBUTING.md](https://github.com/opus-domini/fast-shot/blob/main/CONTRIBUTING.md) file.\n\n## Stargazers over time ⭐\n\n[![Stargazers over time](https://starchart.cc/opus-domini/fast-shot.svg?variant=adaptive)](https://starchart.cc/opus-domini/fast-shot)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopus-domini%2Ffast-shot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopus-domini%2Ffast-shot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopus-domini%2Ffast-shot/lists"}