{"id":16464496,"url":"https://github.com/deatil/doak-curl","last_synced_at":"2026-04-29T15:33:59.477Z","repository":{"id":61839418,"uuid":"509318869","full_name":"deatil/doak-curl","owner":"deatil","description":"go 版本的 curl 对外请求库","archived":false,"fork":false,"pushed_at":"2022-07-01T04:27:51.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-10T10:29:10.380Z","etag":null,"topics":["curl","doak-curl","go","go-curl","http"],"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/deatil.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}},"created_at":"2022-07-01T04:23:15.000Z","updated_at":"2022-07-01T04:30:41.000Z","dependencies_parsed_at":"2022-10-22T05:00:43.928Z","dependency_job_id":null,"html_url":"https://github.com/deatil/doak-curl","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Fdoak-curl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Fdoak-curl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Fdoak-curl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deatil%2Fdoak-curl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deatil","download_url":"https://codeload.github.com/deatil/doak-curl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241014032,"owners_count":19894183,"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":["curl","doak-curl","go","go-curl","http"],"created_at":"2024-10-11T11:28:12.776Z","updated_at":"2026-04-29T15:33:54.455Z","avatar_url":"https://github.com/deatil.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## doak-curl\n\ngo 版本的 curl 对外请求库\n\n\n### 项目介绍\n\n*  使用 go 开发的对外请求库\n\n\n### 使用方法\n\n1. 下载\n\n```go\ngo get -u github.com/deatil/doak-curl\n```\n\n2. 使用\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n\n    \"github.com/deatil/doak-curl/curl\"\n)\n\nfunc main() {\n    client := curl.New(\n        curl.WithBaseURI(\"http://yourdomain.com/api\"),\n        curl.WithTimeout(35),\n        curl.WithResCharset(\"utf-8\"),\n    )\n\n    resp, err := client.Get(\n        \"/get-data\",\n        curl.WithParams(map[string]any{\n            \"p\": \"123\",\n        }),\n    )\n    if err != nil {\n        fmt.Println(err.Error())\n        return\n    }\n\n    data, err2 := resp.GetContents()\n    if err2 != nil {\n        fmt.Println(err2.Error())\n        return\n    }\n\n    fmt.Println(data)\n}\n```\n\n\n### 开源协议\n\n*  `doak-curl` 遵循 `Apache2` 开源协议发布，在保留本软件版权的情况下提供个人及商业免费使用。\n\n\n### 版权\n\n*  该系统所属版权归 deatil(https://github.com/deatil) 所有。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeatil%2Fdoak-curl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeatil%2Fdoak-curl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeatil%2Fdoak-curl/lists"}