{"id":30659575,"url":"https://github.com/toukii/httpvf","last_synced_at":"2025-10-19T02:36:22.817Z","repository":{"id":57607496,"uuid":"79794279","full_name":"toukii/httpvf","owner":"toukii","description":"http test","archived":false,"fork":false,"pushed_at":"2025-08-28T12:41:56.000Z","size":3931,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-31T13:02:14.870Z","etag":null,"topics":["golang","rest-api","test-suite","testing-tools","veritrans","yml"],"latest_commit_sha":null,"homepage":null,"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/toukii.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-01-23T10:29:19.000Z","updated_at":"2025-08-28T12:42:00.000Z","dependencies_parsed_at":"2025-08-31T13:02:12.461Z","dependency_job_id":null,"html_url":"https://github.com/toukii/httpvf","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/toukii/httpvf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toukii%2Fhttpvf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toukii%2Fhttpvf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toukii%2Fhttpvf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toukii%2Fhttpvf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/toukii","download_url":"https://codeload.github.com/toukii/httpvf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/toukii%2Fhttpvf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272982814,"owners_count":25025984,"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-08-31T02:00:09.071Z","response_time":79,"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":["golang","rest-api","test-suite","testing-tools","veritrans","yml"],"created_at":"2025-08-31T13:01:53.397Z","updated_at":"2025-10-19T02:36:17.781Z","avatar_url":"https://github.com/toukii.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# httpvf\nhttp REST API verify\n\n## get\n\n```\ngo get github.com/toukii/httpvf/vf\n```\n\n## example\n\n\n__vf.yml:__\n\n\n```yml\n-\n  url: http://upload.daoapp.io/topic\n  method: POST\n  header:\n    Content-Type: \"application/x-www-form-urlencoded\"\n  body: \"title=topic001\u0026content=content001\"\n  resp:\n    code: 200\n    cost: 900\n-\n  url: http://upload.daoapp.io/loadfile/topic001\n  method: GET\n  resp:\n    code: 200\n    cost: 80\n    body: content001\n-\n  url: http://upload.daoapp.io/uploadform/\n  method: POST\n  filename : vf.yml\n  resp:\n    code: 200\n    cost: 10\n```\n\n\nverify:\n\n```\nvf -v vf.yml\n```\n\n## 请求\n\n - url: [请求地址]\n \n - method: [请求方法]\n \n - body: [请求body]，可以将请求写在文件中，body的写法：\n\n```\nbody: \"@[filename]\"\n```\n \n - n: [请求个数]\n \n - interval: [请求间隔]\n \n - runtine: [请求并发数]\n \n - upload: [web前段传入的文件名（input name）]@[上传文件名]\n\n - header: 请求的header参数，map结构\n \n```\nheader:\n   Content-Type: \"application/x-www-form-urlencoded\"\n```\n \n - param: GET 请求的参数，map结构\n\n```\nparam:\n  name: toukii\n  position: dev-ops\n```\n\n - then: [下一步请求]\n\n```\nthen:\n  - url: https://github.com/toukii\n  - url: https://github.com/toukii/httpvf\n```\n\n - sync: [下一步请求的同步方式，仅约束下一级的请求]\n\n ```\n sync: true\n ```\n\n_例如：_\n\n ```\n url: http://gocn.io\n sync: true\n then:\n   - url: https://github.com/toukii\n   - url: https://github.com/toukii/httpvf\n ```\n\n 完成`gocn.io`的请求之后，同步依次完成两个子请求。\n\n----------------------------------------\n\n## 验证响应\n\n - code: [响应码]\n \n - cost: [响应时间，单位ms]\n \n - body: [直接验证内容]\n \n - regex: [正则表达式]\n\n\n### json\n\n - 路径以\",\"分割\n\n - 路径若有纯数字，为数字加上\"\"\n \n - 数组下标从0开始，直接写数字\n \n 例如，返回的json内容如下：\n \n```json\n[\n    {\n        \"Map\": {\n            \"1\": \"hello\"\n        },\n        \"Message\": \"This is toukii,r1\",\n        \"Cost\": 0.315\n    }\n]\n```\n\n验证hello的写法为：\n\n```yml\njson: \n  '0,Map,\"1\"': hello\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoukii%2Fhttpvf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftoukii%2Fhttpvf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftoukii%2Fhttpvf/lists"}