{"id":13757530,"url":"https://github.com/fstab/h2c","last_synced_at":"2025-05-08T21:10:06.632Z","repository":{"id":32497568,"uuid":"36078250","full_name":"fstab/h2c","owner":"fstab","description":"http2client","archived":false,"fork":false,"pushed_at":"2017-03-01T13:01:30.000Z","size":17752,"stargazers_count":275,"open_issues_count":9,"forks_count":18,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-02-02T02:54:15.492Z","etag":null,"topics":[],"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/fstab.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":"2015-05-22T15:02:25.000Z","updated_at":"2025-01-08T06:00:01.000Z","dependencies_parsed_at":"2022-08-31T12:02:20.198Z","dependency_job_id":null,"html_url":"https://github.com/fstab/h2c","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fstab%2Fh2c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fstab%2Fh2c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fstab%2Fh2c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fstab%2Fh2c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fstab","download_url":"https://codeload.github.com/fstab/h2c/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238044093,"owners_count":19407128,"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":[],"created_at":"2024-08-03T12:00:40.503Z","updated_at":"2025-02-10T02:04:45.868Z","avatar_url":"https://github.com/fstab.png","language":"Go","funding_links":[],"categories":["Go","Categories"],"sub_categories":["Command Line Tools"],"readme":"h2c - A Simple HTTP/2 Command-Line Client\n-----------------------------------------\n\n`h2c` is a simple HTTP/2 command-line client, like `curl`.\n\nWhile `curl` terminates after each request/response cycle, `h2c` runs a background process to keep connections open.\nThat way, `h2c` may receive asynchronous [push](https://httpwg.github.io/specs/rfc7540.html#PushResources) messages from the server.\n\n`h2c` is currently in a very early stage. The best way to learn about it is to read the blog posts on [unrestful.io](http://unrestful.io).\n\nScreenshots\n-----------\n\n![h2c dump](doc/h2c-dump.png)\n\n![h2c command line](doc/h2c-cmdline.png)\n\nBasic Usage\n-----------\n\n```bash\nh2c start \u0026\nh2c connect http2.akamai.com\nh2c get /index.html\nh2c stop\n```\n\nCommand Overview\n----------------\n\nFor a complete list of available commands, run `h2c --help`.\n\n* `h2c start [options]` Start the h2c process. The h2c process must be started before running any other command.\n* `h2c connect [options] \u003chost\u003e:\u003cport\u003e` Connect to a server using https\n* `h2c disconnect` Disconnect from server\n* `h2c get [options] \u003cpath\u003e` Perform a GET request\n* `h2c post [options] \u003cpath\u003e` Perform a POST request\n* `h2c set \u003cheader-name\u003e \u003cheader-value\u003e` Set a header. The header will be valid for all subsequent requests.\n* `h2c unset \u003cheader-name\u003e [\u003cheader-value\u003e]` Undo 'h2c set'.\n* `h2c ping` Send a ping.\n* `h2c pid` Show the process id of the h2c process.\n* `h2c push-list` List responses that are available as push promises.\n* `h2c stream-info` List streams and their states.\n* `h2c stop` Stop the h2c process\n* `h2c wiretap \u003clocalhost:port\u003e \u003cremotehost:port\u003e` Listen on localhost:port and forward all traffic to remotehost:port.\n\nHow to Download and Run\n-----------------------\n\nBinary releases are available on the [GitHub Releases](https://github.com/fstab/h2c/releases).\n\n1. Download the latest release ZIP file: [h2c-v0.0.12.zip](https://github.com/fstab/h2c/releases/download/v0.0.12/h2c-v0.0.12.zip)\n2. Extract the ZIP file\n3. Find the executable for your system in the `bin` folder:\n  * Linux: `h2c_linux_amd64`\n  * OS X: `h2c_darwin_amd64`\n  * Windows: `h2c_windows_amd64.exe`\n4. Rename that executable to `h2c`, or `h2c.exe` on Windows\n5. Move the executable into a folder on your PATH.\n\nHow to Build from Source\n------------------------\n\n`h2c` is developed with [Go 1.6](https://golang.org/dl/). The external dependencies are located in the `vendor/` directory.\nIn Go 1.6, the `vendor/` directory will be used by default. In order to build `h2c` with Go 1.5, you must enable the [Go 1.5 vendor handling](http://engineeredweb.com/blog/2015/go-1.5-vendor-handling/) by setting the environment variable `GO15VENDOREXPERIMENT` to `1`.\n\nThe following command will download, compile, and install `h2c`:\n\n```bash\ngo get github.com/fstab/h2c\n```\n\nRelated Work\n------------\n\n`h2c` uses parts of Brad Fitzpatrick's [HTTP/2 support for Go](https://github.com/bradfitz/http2). There is an HTTP/2 console debugger included in [bradfitz/http2](https://github.com/bradfitz/http2), but just like `h2c`, it is currently only a quick few hour hack, so it is hard to tell if they aim at the same kind of tool.\n\nLICENSE\n-------\n\n`h2c` is licensed under the [Apache License, Version 2.0](LICENSE).\n\n`h2c` is implemented in [Go](https://golang.org) and uses Go's [standard library](https://golang.org/pkg/#stdlib), which is licensed under [Google's Go license](https://code.google.com/p/go/source/browse/LICENSE), which is a variant of the [BSD License](https://en.wikipedia.org/wiki/BSD_licenses).\n\nThe following 3rd party libraries are used:\n\n  * `golang.org/x/net/http2/hpack` implements the [Header Compression for HTTP/2 (HPACK)](https://httpwg.github.io/specs/rfc7541.html). The library is licensed  [under the terms of Go itself](https://github.com/bradfitz/http2/blob/master/LICENSE).\n  * `github.com/fatih/color` implements the color output used in `h2c start --dump`. The library is licensed under an [MIT License](https://github.com/fatih/color/blob/master/LICENSE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffstab%2Fh2c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffstab%2Fh2c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffstab%2Fh2c/lists"}