{"id":30690235,"url":"https://github.com/followtheprocess/zap","last_synced_at":"2025-09-02T02:10:19.834Z","repository":{"id":311979786,"uuid":"1045844631","full_name":"FollowTheProcess/zap","owner":"FollowTheProcess","description":"A command line .http file toolkit","archived":false,"fork":false,"pushed_at":"2025-08-27T20:31:52.000Z","size":1517,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-28T05:12:45.392Z","etag":null,"topics":["api","cli","go","http","http-file","http-requests","rest-api","testing"],"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/FollowTheProcess.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}},"created_at":"2025-08-27T19:48:33.000Z","updated_at":"2025-08-27T20:31:55.000Z","dependencies_parsed_at":"2025-08-28T05:12:58.422Z","dependency_job_id":"7cde9de9-94d5-49da-aff4-61f3d2811f4d","html_url":"https://github.com/FollowTheProcess/zap","commit_stats":null,"previous_names":["followtheprocess/zap"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/FollowTheProcess/zap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FollowTheProcess%2Fzap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FollowTheProcess%2Fzap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FollowTheProcess%2Fzap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FollowTheProcess%2Fzap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FollowTheProcess","download_url":"https://codeload.github.com/FollowTheProcess/zap/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FollowTheProcess%2Fzap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273218437,"owners_count":25065915,"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-09-02T02:00:09.530Z","response_time":77,"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","cli","go","http","http-file","http-requests","rest-api","testing"],"created_at":"2025-09-02T02:10:18.827Z","updated_at":"2025-09-02T02:10:19.828Z","avatar_url":"https://github.com/FollowTheProcess.png","language":"Go","readme":"\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/FollowTheProcess/zap/raw/main/docs/img/logo.png\" alt=\"logo\"\u003e\n\u003c/p\u003e\n\n# Zap\n\n[![License](https://img.shields.io/github/license/FollowTheProcess/zap)](https://github.com/FollowTheProcess/zap)\n[![Go Report Card](https://goreportcard.com/badge/github.com/FollowTheProcess/zap)](https://goreportcard.com/report/github.com/FollowTheProcess/zap)\n[![GitHub](https://img.shields.io/github/v/release/FollowTheProcess/zap?logo=github\u0026sort=semver)](https://github.com/FollowTheProcess/zap)\n[![CI](https://github.com/FollowTheProcess/zap/workflows/CI/badge.svg)](https://github.com/FollowTheProcess/zap/actions?query=workflow%3ACI)\n[![codecov](https://codecov.io/gh/FollowTheProcess/zap/branch/main/graph/badge.svg)](https://codecov.io/gh/FollowTheProcess/zap)\n\nA command line `.http` file toolkit\n\n\u003e [!WARNING]\n\u003e **Zap is in early development and is not yet ready for use**\n\n![caution](./docs/img/caution.png)\n\n## Project Description\n\n`zap` is a command line toolkit to work with, execute, and run API tests using `.http` files. See any of the following guides for an overview of the `.http` file syntax:\n\n- [JetBrains HTTP Request in Editor Spec]\n- [JetBrains Syntax Guide]\n- [VSCode REST Extension]\n\n```http\n// Comments can begin with slashes '/' or hashes '#' and last until the next newline character '\\n'\n# This is also a comment (I'll use '/' from now on but you are free to use both)\n\n// Global variables (e.g. base url) can be defined with '@ident = \u003cvalue\u003e'\n@base = https://api.company.com\n\n// 3 '#' in a row mark a new HTTP request, with an optional comment e.g. \"Deletes employee 1\"\n// This comment is effectively the description of the request\n### [comment]\nHTTP_METHOD \u003curl\u003e\nHeader-Name: \u003cheader value\u003e\n\n// You can also give them names like this, although names like this\n// do not allow spaces e.g. 'Delete employee 1' must be 'DeleteEmployee1'\n###\n# @name \u003cname\u003e\n# @name=\u003cname\u003e\n# @name = \u003cname\u003e\nHTTP_METHOD \u003curl\u003e\n...\n\n// Global variables are interpolated like this\n### Get employee 1\nGET {{ base }}/employees/1\n\n// Pass the body of requests like this\n### Update employee 1 name\nPATCH {{ base }}/employees/1\nContent-Type: application/json\n\n{\n  \"name\": \"Namey McNamerson\"\n}\n```\n\n## Installation\n\nCompiled binaries for all supported platforms can be found in the [GitHub release]. There is also a [homebrew] tap:\n\n```shell\nbrew install --cask FollowTheProcess/tap/zap\n```\n\n## Quickstart\n\nGiven a `.http` file containing 1 or more http requests like this:\n\n```http\n// demo.http\n\n@base = https://jsonplaceholder.typicode.com\n\n### Simple demo request\n# @name Demo\nGET {{ base }}/todos/1\nAccept: application/json\n```\n\nYou can invoke any one of them, like this...\n\n```shell\n# zap do [file] [request name]\nzap do ./demo.http Demo\n```\n\n## Compatibility\n\nWhile there is a strict specification for the format of pure HTTP requests ([RFC9110]). There is little/no formal specification for the evolution of the format used in this project, the\nclosest things available are:\n\n- [JetBrains HTTP Request in Editor Spec]\n- [JetBrains Syntax Guide]\n- [VSCode REST Extension]\n\nAnd careful inspection of them reveals a number of discrepancies and inconsistencies between them. As a result, knowing which features/syntax to support for this project\nwas... tricky. So this project is a best effort to support the syntax and features that I thought was most reasonable and achievable in a standalone command line tool\nnot built into an IDE.\n\nSome of the more prominent differences are:\n\n### Whitespace\n\nThe [JetBrains HTTP Request in Editor Spec] specifies exact whitespace requirements between different sections e.g. a single `\\n` character *must* follow a request line.\n\nSee \u003chttps://github.com/JetBrains/http-request-in-editor-spec/blob/master/spec.md#23-whitespaces\u003e\n\nThis project makes no such requirement, whitespace is entirely ignored meaning the formatting of `.http` files is up to convention and/or automatic formatting tools\n\n### Response Handlers\n\nThe [JetBrains HTTP Request in Editor Spec] allows for custom JavaScript [Response Handlers](https://github.com/JetBrains/http-request-in-editor-spec/blob/master/spec.md#324-response-handler) (e.g. the `{% ... %}` blocks), that take the response and transform it in some way:\n\n```http\nGET http://example.com/auth\n\n\u003e {% client.global.set(\"auth\", response.body.token); %}\n```\n\nThis is not supported in `zap` as it relies on editor-specific context and requires a JavaScript runtime.\n\nHowever, the version of this syntax where you dump the response body to a file *is* supported!\n\n```http\nGET http://example.com/auth\n\n\u003e ./response.json\n```\n\n### Response Reference\n\nThe [JetBrains HTTP Request in Editor Spec] allows for a [Response Reference], but doesn't actually explain what that is or what should be done with it? So I've left it out for now 🤷🏻\n\n```http\nGET http://example.com\n\n\u003c\u003e previous-response.200.json\n```\n\n\u003e [!NOTE]\n\u003e I can foresee a potential use for this syntax: Saving the first response to the filepath indicated and then the next time it runs, comparing the responses and generating a diff of\n\u003e the previous response vs the current one. This isn't implemented yet but it's in the back of my mind for the future 👀\n\n### Credits\n\nThis package was created with [copier] and the [FollowTheProcess/go-template] project template.\n\n[copier]: https://copier.readthedocs.io/en/stable/\n[FollowTheProcess/go-template]: https://github.com/FollowTheProcess/go-template\n[GitHub release]: https://github.com/FollowTheProcess/zap/releases\n[homebrew]: https://brew.sh\n[JetBrains Syntax Guide]: https://www.jetbrains.com/help/idea/exploring-http-syntax.html\n[RFC9110]: https://www.rfc-editor.org/rfc/rfc9110.html\n[JetBrains HTTP Request in Editor Spec]: https://github.com/JetBrains/http-request-in-editor-spec\n[VSCode REST Extension]: https://github.com/Huachao/vscode-restclient\n[Response Reference]: https://github.com/JetBrains/http-request-in-editor-spec/blob/master/spec.md#325-response-reference\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffollowtheprocess%2Fzap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffollowtheprocess%2Fzap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffollowtheprocess%2Fzap/lists"}