{"id":42492170,"url":"https://github.com/paingha/vider","last_synced_at":"2026-01-28T12:24:03.355Z","repository":{"id":45472481,"uuid":"335707409","full_name":"paingha/vider","owner":"paingha","description":"Golang HTTP Request Package with JavaScript Fetch-like API","archived":false,"fork":false,"pushed_at":"2021-12-12T14:53:46.000Z","size":22,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-21T03:13:54.810Z","etag":null,"topics":["api-request","fetch-api","golang","http"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/paingha.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-03T17:46:31.000Z","updated_at":"2021-12-12T15:11:34.000Z","dependencies_parsed_at":"2022-07-18T23:18:10.270Z","dependency_job_id":null,"html_url":"https://github.com/paingha/vider","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/paingha/vider","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paingha%2Fvider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paingha%2Fvider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paingha%2Fvider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paingha%2Fvider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/paingha","download_url":"https://codeload.github.com/paingha/vider/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/paingha%2Fvider/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28845124,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T10:53:21.605Z","status":"ssl_error","status_checked_at":"2026-01-28T10:53:20.789Z","response_time":57,"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":["api-request","fetch-api","golang","http"],"created_at":"2026-01-28T12:24:02.553Z","updated_at":"2026-01-28T12:24:03.339Z","avatar_url":"https://github.com/paingha.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e Vider \u003c/h1\u003e \u003cbr\u003e\n\nVider is a HTTP package with Javascript Fetch like API for making HTTP requests and handing responses. This project aims to help making HTTP requests in Go easier and fun. All responses are JSON encoded automatically.\n\nVider v1.0.1 has been released 🎉 🎉 🎉.\n\n\n## Table of Contents\n\n* [Installation](#installation)\n* [Importing \u0026 Usage](#usage)\n* [Similarities](#similarities)\n* [Changelog](#chanelog)\n* [Author](#author)\n  \n## Installation\n\n```\ngo get github.com/paingha/vider@v1.0.1\n```\n\n## Importing \u0026 Usage\n\nImport the package and setup the request. URL (string), Client (http.Client{} from the net/http package), Params (vider.Params).\n\n### Vider Get Request Example\nA Get Request using Vider\n\nvider.Get - returns a response (which has a StatusCode and a StatusMessage) and an error\n\n```golang\nimport(\n    \"github.com/paingha/vider\"\n    \"net/http\"\n    \"log\"\n)\ntype TodoResponse struct {\n\tTitle  string `json:\"title\"`\n\tBody   string `json:\"body\"`\n\tID     int    `json:\"id\"`\n\tUserID int    `json:\"userId\"`\n}\nresp, err := vider.Get(\u0026vider.Request{\n\t\tURL:    \"https://jsonplaceholder.typicode.com/todos/1\",\n\t\tClient: \u0026http.Client{},\n\t\tParams: vider.Params{\n\t\t\t\"headers\": {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t},\n\t\tData: TodoResponse{},\n\t})\nif err != nil {\n\tlog.Error(err)\n}\nlog.Println(resp)\n//You will need to type cast from interface to the needed data datatype\nlog.Println(resp.Body.(TodoResponse).Title)\n```\n\n### Vider Post Request Example\nA Post Request using Vider is as simple and similar as the fetch API:\n\nvider.Post - returns a response (which has a StatusCode and a StatusMessage) and an error\n\n```golang\nimport(\n    \"github.com/paingha/vider\"\n    \"net/http\"\n    \"log\"\n)\ntype TodoResponse struct {\n\tTitle  string `json:\"title\"`\n\tBody   string `json:\"body\"`\n\tID     int    `json:\"id\"`\n\tUserID int    `json:\"userId\"`\n}\n\ntype TodoRequest struct {\n\tTitle  string `json:\"title\"`\n\tBody   string `json:\"body\"`\n\tID     int    `json:\"id\"`\n\tUserID int    `json:\"userId\"`\n}\nresp, err := vider.Post(\u0026vider.Request{\n\t\tURL:    \"https://jsonplaceholder.typicode.com/posts\",\n\t\tClient: \u0026http.Client{},\n\t\tParams: vider.Params{\n\t\t\t\"headers\": {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t},\n\t\tBody: \u0026TodoRequest{\n\t\t\tTitle:  \"Test Vider\",\n\t\t\tBody:   \"Testing Vider\",\n\t\t\tUserID: 1,\n\t\t},\n\t\tData: TodoResponse{},\n})\nif err != nil {\n\tlog.Error(err)\n}\nlog.Println(resp)\n//You will need to type cast from interface to the needed data datatype\nlog.Println(resp.Body.(TodoResponse).Title)\n```\n\n### Vider Put Request Example\nA Put Request using Vider sends a PATCH HTTP Request:\n\nvider.Put - returns a response (which has a StatusCode and a StatusMessage) and an error\n\n```golang\nimport(\n    \"github.com/paingha/vider\"\n    \"net/http\"\n    \"log\"\n)\ntype TodoResponse struct {\n\tTitle  string `json:\"title\"`\n\tBody   string `json:\"body\"`\n\tID     int    `json:\"id\"`\n\tUserID int    `json:\"userId\"`\n}\n\ntype TodoRequest struct {\n\tTitle  string `json:\"title\"`\n\tBody   string `json:\"body\"`\n\tID     int    `json:\"id\"`\n\tUserID int    `json:\"userId\"`\n}\nresp, err := vider.Put(\u0026vider.Request{\n\t\tURL:    \"https://jsonplaceholder.typicode.com/posts/1\",\n\t\tClient: \u0026http.Client{},\n\t\tParams: vider.Params{\n\t\t\t\"headers\": {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t},\n\t\tBody: \u0026TodoRequest{\n\t\t\tID:     1,\n\t\t\tTitle:  \"Test Vider\",\n\t\t\tBody:   \"Testing Vider\",\n\t\t\tUserID: 1,\n\t\t},\n\t\tData: TodoResponse{},\n})\nif err != nil {\n\tlog.Error(err)\n}\nlog.Println(resp)\n//You will need to type cast from interface to the needed data datatype\nlog.Println(resp.Body.(TodoResponse).Title)\n```\n\n### Vider Delete Request Example\nA Delete Request using Vider sends a DELETE HTTP Request:\n\nvider.Delete - returns a response (which has a StatusCode and a StatusMessage) and an error\n\n```golang\nimport(\n    \"github.com/paingha/vider\"\n    \"net/http\"\n    \"log\"\n)\ntype TodoResponse struct {\n\tTitle  string `json:\"title\"`\n\tBody   string `json:\"body\"`\n\tID     int    `json:\"id\"`\n\tUserID int    `json:\"userId\"`\n}\n\ntype TodoRequest struct {\n\tTitle  string `json:\"title\"`\n\tBody   string `json:\"body\"`\n\tID     int    `json:\"id\"`\n\tUserID int    `json:\"userId\"`\n}\nresp, err := vider.Delete(\u0026vider.Request{\n\t\tURL:    \"https://jsonplaceholder.typicode.com/todos/1\",\n\t\tClient: \u0026http.Client{},\n\t\tParams: vider.Params{\n\t\t\t\"headers\": {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t},\n\t\tData: TodoResponse{},\n\t})\nif err != nil {\n\tlog.Error(err)\n}\nlog.Println(resp)\n```\n\n\n## Similarities\n\nJavascript Fetch Request\n\n```javascript\nfetch('https://jsonplaceholder.typicode.com/todos/1', {\n\tmethod: 'GET',\n\theaders: {\n    'Content-Type': 'application/json'\n  \t},\n})\n```\n\nVider Get Request\n\n\nvider.Get - returns a response (which has a StatusCode and a StatusMessage) and an error\n\n```golang\nimport(\n    \"github.com/paingha/vider\"\n    \"net/http\"\n    \"log\"\n)\ntype TodoResponse struct {\n\tTitle  string `json:\"title\"`\n\tBody   string `json:\"body\"`\n\tID     int    `json:\"id\"`\n\tUserID int    `json:\"userId\"`\n}\nresp, err := vider.Get(\u0026vider.Request{\n\t\tURL:    \"https://jsonplaceholder.typicode.com/todos/1\",\n\t\tClient: \u0026http.Client{},\n\t\tParams: vider.Params{\n\t\t\t\"headers\": {\n\t\t\t\t\"Content-Type\": \"application/json\",\n\t\t\t},\n\t\t},\n\t\tData: TodoResponse{},\n\t})\nif err != nil {\n\tlog.Error(err)\n}\nlog.Println(resp)\n//You will need to type cast from interface to the needed data datatype\nlog.Println(resp.Body.(TodoResponse).Title)\n```\n\n## Changelog\n\n### v1.0 - Official production release\n\u003cul\u003e\n\u003cli\u003eAdded JSON to Struct serialization for responses\u003c/li\u003e\n\u003cli\u003eAdded Tests and Github workflow to run them\u003c/li\u003e\n\u003c/ul\u003e\n\n## Author\n\nHi! I am Paingha Joe Alagoa Jnr. I am a recent college graduate with 5 years experience using Golang and Javascript to build scalable and user friendly applications.\n\u003cbr/\u003e\n\u003cbr /\u003e\n\u003cstrong\u003eCurrently Open to New Full-time Software Developer positions in the United States (both remote and in person roles) for Golang and Javascript. \u003c/strong\u003e\n\u003cbr /\u003e\n\u003cbr /\u003e\nContact me by Twitter or Linked In :)\n\u003cbr/\u003e\n[Linked In](https://www.linkedin.com/in/paingha-alagoa-joe/)\n\u003cbr /\u003e\n[Twitter](https://twitter.com/painghajnr)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaingha%2Fvider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpaingha%2Fvider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpaingha%2Fvider/lists"}