{"id":18719471,"url":"https://github.com/henomis/restclientgo","last_synced_at":"2025-07-30T13:32:52.820Z","repository":{"id":143197920,"uuid":"614735308","full_name":"henomis/restclientgo","owner":"henomis","description":"REST client for Go","archived":false,"fork":false,"pushed_at":"2024-01-27T23:49:33.000Z","size":32,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-19T14:17:28.037Z","etag":null,"topics":["api","client","go","model","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/henomis.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}},"created_at":"2023-03-16T07:59:44.000Z","updated_at":"2025-04-02T17:48:06.000Z","dependencies_parsed_at":"2024-01-28T00:52:15.973Z","dependency_job_id":"c0f9f904-4c36-4e55-bbbf-239c373a1d12","html_url":"https://github.com/henomis/restclientgo","commit_stats":null,"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/henomis/restclientgo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henomis%2Frestclientgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henomis%2Frestclientgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henomis%2Frestclientgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henomis%2Frestclientgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/henomis","download_url":"https://codeload.github.com/henomis/restclientgo/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/henomis%2Frestclientgo/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267875539,"owners_count":24158781,"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","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["api","client","go","model","rest"],"created_at":"2024-11-07T13:26:11.949Z","updated_at":"2025-07-30T13:32:52.782Z","avatar_url":"https://github.com/henomis.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RESTclientGo\n\n[![Build Status](https://github.com/henomis/restclientgo/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/henomis/restclientgo/actions/workflows/test.yml?query=branch%3Amain) [![GoDoc](https://godoc.org/github.com/henomis/restclientgo?status.svg)](https://godoc.org/github.com/henomis/restclientgo) [![Go Report Card](https://goreportcard.com/badge/github.com/henomis/restclientgo)](https://goreportcard.com/report/github.com/henomis/restclientgo) [![GitHub release](https://img.shields.io/github/release/henomis/restclientgo.svg)](https://github.com/henomis/restclientgo/releases)\n\n\nREST client for Go focusing on Request and Response data modeling.\n\n## Rest methods\nrestclientgo offers the following methods\n\n* GET\n* POST\n* PUT\n* DELETE\n* PATCH\n\n## Modeling\n\n### Request\nDefine your request model and attach restclientgo methods to satisfy the Request interface.\n\n```go\ntype MyRequest struct {\n    // Add your request fields here\n    // ID string `json:\"id\"`\n    // ...\n}\n\nfunc (r *MyRequest) Path() (string, error) {\n    // Return the path of the request including the query string if any.\n}\n\nfunc (r *MyRequest) Encode() (io.Reader, error) {\n    // Return the request body as string\n}\n\nfunc (r *MyRequest) ContentType() string {\n    // Return the content type of the request\n}\n```\n\n### Response\nDefine your response model and attach restclientgo methods to satisfy the Response interface.\n\n```go\ntype MyResponse struct {\n    // Add your response fields here\n    // ID string `json:\"id\"`\n    // ...\n}\n\nfunc (r *MyResponse) Decode(body io.Reader) error {\n    // Decode the response body into the response model\n}\n\nfunc (r *MyResponse) SetBody(body io.Reader) error {\n    // Set the response body if needed\n}\n\nfunc (r *MyResponse) SetStatusCode(code int) error {\n    // Handler to set the HTTP status code of the response\n}\n\nfunc (r *MyResponse) AcceptContentType() string {\n    // Return the accepted content type of the response\n}\n\n// Optional. Implement this method if you want to stream the response body.\nfunc (r *MyResponse) StreamCallback() StreamCallback {\n    // Return the stream callback if any.\n}\n```\n\n## Usage\nPlease referr to the [examples](examples/cmd/) folder for usage examples.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenomis%2Frestclientgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhenomis%2Frestclientgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhenomis%2Frestclientgo/lists"}