{"id":29108547,"url":"https://github.com/fako1024/fhttpc","last_synced_at":"2025-06-29T06:11:39.123Z","repository":{"id":255818719,"uuid":"853675606","full_name":"fako1024/fhttpc","owner":"fako1024","description":"A simple wrapper around the Go fasthttp client optimized for ease-of-use","archived":false,"fork":false,"pushed_at":"2024-10-26T13:28:09.000Z","size":53,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-22T08:34:45.125Z","etag":null,"topics":["fasthttp","fasthttpclient","http-client","method-chaining"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fako1024.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":"2024-09-07T07:59:50.000Z","updated_at":"2024-09-10T04:45:34.000Z","dependencies_parsed_at":"2025-03-01T11:23:59.640Z","dependency_job_id":"6fca1776-37ac-4e3a-bd27-682fc89b5431","html_url":"https://github.com/fako1024/fhttpc","commit_stats":null,"previous_names":["fako1024/fhttpc"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/fako1024/fhttpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fako1024%2Ffhttpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fako1024%2Ffhttpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fako1024%2Ffhttpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fako1024%2Ffhttpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fako1024","download_url":"https://codeload.github.com/fako1024/fhttpc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fako1024%2Ffhttpc/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262545043,"owners_count":23326665,"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":["fasthttp","fasthttpclient","http-client","method-chaining"],"created_at":"2025-06-29T06:11:38.582Z","updated_at":"2025-06-29T06:11:39.102Z","avatar_url":"https://github.com/fako1024.png","language":"Go","readme":"# A simple wrapper around the Go fasthttp client optimized for ease-of-use\n\n[![Github Release](https://img.shields.io/github/release/fako1024/fhttpc.svg)](https://github.com/fako1024/fhttpc/releases)\n[![GoDoc](https://godoc.org/github.com/fako1024/fhttpc?status.svg)](https://godoc.org/github.com/fako1024/fhttpc/)\n[![Go Report Card](https://goreportcard.com/badge/github.com/fako1024/fhttpc)](https://goreportcard.com/report/github.com/fako1024/fhttpc)\n[![Build/Test Status](https://github.com/fako1024/fhttpc/workflows/Go/badge.svg)](https://github.com/fako1024/fhttpc/actions?query=workflow%3AGo)\n[![CodeQL](https://github.com/fako1024/fhttpc/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/fako1024/fhttpc/actions/workflows/codeql-analysis.yml)\n\nThis package wraps the Go [fasthttp](https://github.com/valyala/fasthttp) client, providing a simplified interaction model using method chaining and various additional capabilities.\n\n## Features\n- Simple, method chaining based interface for fasthttp client requests\n- Simulation of request delays\n- Customization of fasthttp client via functional parameter\n- Back-Off-Retry concept to automatically retry requests if required\n\n## Installation\n```bash\ngo get -u github.com/fako1024/fhttpc\n```\n\n## Examples\n#### Perform simple HTTP GET request\n```go\nerr := fhttpc.New(\"GET\", \"http://example.org\").Run()\nif err != nil {\n\tlog.Fatalf(\"error performing GET request: %s\", err)\n}\n```\n\n#### Perform HTTP GET request and parse the result as JSON into a struct\n```go\nvar res = struct {\n\tStatus int\n\tMessage string\n}{}\nerr := fhttpc.New(\"GET\", \"http://example.org\").\n\tParseJSON(\u0026res).\n\tRun()\nif err != nil {\n\tlog.Fatalf(\"error performing GET request: %s\", err)\n}\n```\n\n#### Perform HTTPS POST request with a simple body, disabling certificate validation and copying the response to a bytes.Buffer\n```go\nbuf := new(bytes.Buffer)\nerr := fhttpc.New(\"POST\", \"https://example.org\").\n\tSkipCertificateVerification().\n\tBody([]byte{0x1, 0x2}).\n\tParseFn(fhttpc.Copy(buf)).\n\tRun()\n\nif err != nil {\n    log.Fatalf(\"error performing POST request: %s\", err)\n}\n\nfmt.Println(buf.String())\n```\n\n#### Perform HTTPS GET request (with query parameters + headers + basic auth)\n```go\nerr := fhttpc.New(\"GET\", \"https://example.org\").\n\tSkipCertificateVerification().\n\tQueryParams(fhttpc.Params{\n\t\t\"param\": \"test\",\n\t}).\n\tHeaders(fhttpc.Params{\n\t\t\"X-HEADER-TEST\": \"test\",\n\t}).\n\tAuthBasic(\"username\", \"password\").\n\tRun()\n\nif err != nil {\n\tlog.Fatalf(\"error performing GET request: %s\", err)\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffako1024%2Ffhttpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffako1024%2Ffhttpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffako1024%2Ffhttpc/lists"}